Skip to content

feat(site): add prev/next series navigation to blog posts - #379

Merged
crs48 merged 1 commit into
mainfrom
claude/upbeat-taussig-f2def6
Jul 4, 2026
Merged

feat(site): add prev/next series navigation to blog posts#379
crs48 merged 1 commit into
mainfrom
claude/upbeat-taussig-f2def6

Conversation

@crs48

@crs48 crs48 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

What

Adds a previous / next pager to the foot of every blog post so readers can walk the essays as a series — finishing one and hopping straight to the next.

Each post now ends with a SeriesNav block:

  • Next → advances toward the newer post (reading the series front-to-back).
  • ← Previous goes to the older post.
  • The oldest post (A Great Pirate Age) shows only Next; the newest (Hand on the Tiller) shows only Previous.

How

  • data/blog.ts — two small helpers, seriesOrder() (published posts oldest-first) and seriesNeighbors(slug) (returns { previous, next }). Neighbours derive from the same publishedPosts() ordering the index and RSS feed use, so the pager never drifts out of sync, and drafts are excluded automatically.
  • New component components/blog/SeriesNav.astro — two link cards styled to match the existing blog index cards (border-border, bg-surface, indigo accents, hover states). Renders nothing when there are no neighbours.
  • Wired <SeriesNav slug="…" /> into all 9 post pages, right after </article>.

Verification

Ran the site standalone (pnpm install --ignore-workspace + astro dev, Node 22) and confirmed against the running server:

  • All 9 posts return HTTP 200 with exactly one series-nav block and no render errors.
  • Link directionality, hrefs, and titles are correct across the endpoints and a middle post:
    • a-great-pirate-age → Next only → Data Should Work Like Soil
    • the-gentlest-furnace → Prev Data Should Work Like Soil, Next The Desert That Feeds the Forest
    • hand-on-the-tiller → Previous only → The Tip of the Hook

(site is not a publishable packages/* library, so no changeset is required.)

🤖 Generated with Claude Code

@crs48
crs48 temporarily deployed to pr-379 July 4, 2026 22:26 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

✓ Changelog fragment found — thanks!

Adds a SeriesNav pager to the foot of every blog post so readers can walk
the essays front-to-back. Neighbours are derived from the published-post
ordering in data/blog (new seriesOrder/seriesNeighbors helpers), so the
pager stays in sync with the index and RSS feed. "Next" advances toward
newer posts; "Previous" goes to older ones. The oldest post shows only
Next, the newest only Previous.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
@crs48
crs48 force-pushed the claude/upbeat-taussig-f2def6 branch from ced7f13 to aeb11f8 Compare July 4, 2026 22:28
@crs48
crs48 temporarily deployed to pr-379 July 4, 2026 22:28 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #379.

github-actions Bot added a commit that referenced this pull request Jul 4, 2026
Comment thread site/src/data/blog.ts
* as a running series, so the natural way to read it is front-to-back — the
* reverse of the index's newest-first listing.
*/
export function seriesOrder(): BlogPost[] {
@crs48
crs48 merged commit de9e9ba into main Jul 4, 2026
16 checks passed
@crs48
crs48 deleted the claude/upbeat-taussig-f2def6 branch July 4, 2026 22:45
github-actions Bot added a commit that referenced this pull request Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants