Skip to content

feat: add author pages listing everything an author wrote - #172

Merged
rsbh merged 6 commits into
feat/authorsfrom
feat/author-pages
Aug 20, 2026
Merged

feat: add author pages listing everything an author wrote#172
rsbh merged 6 commits into
feat/authorsfrom
feat/author-pages

Conversation

@rsbh

@rsbh rsbh commented Aug 19, 2026

Copy link
Copy Markdown
Member

Stacked on #171 — base is feat/authors, so this diff shows only the author-page work. Retarget to main once #171 merges.

Authors registry

chronicle.yaml gains an optional registry, so an author's details live in one place instead of on every page:

authors:
  jane:
    name: Jane Doe
    bio: Writes about distributed systems.
    avatar: /team/jane.png
    url: https://github.com/jane
    email: jane@example.com
# page frontmatter
authors: [jane, Sam Patel]

A string matching a key expands to that profile; anything else still reads as a plain name, so an occasional contributor needs no config entry. A registry key and a same-named literal stay distinct authors, since slugs differ (jane vs jane-doe).

Pages

  • /authors — everyone found in the content, with bio and page count
  • /authors/<slug> — profile (avatar, bio, profile link, email) followed by their pages, grouped by content dir label and sorted newest first, undated last, then by title

Screenshots

Screenshot 2026-08-19 at 3 46 25 PM Screenshot 2026-08-19 at 4 04 18 PM Screenshot 2026-08-19 at 4 04 26 PM

The index is built once by buildAuthorIndex and reaches the client three ways, matching how API specs already work: /api/authors in server mode, /data/authors.json in static builds, and embedded in the SSR payload for /authors routes. That last one matters — without it these pages render blank with JavaScript disabled, which #166 established this project cares about. Verified in the served HTML: /authors/jane ships the name, bio, profile link, and all page links server-side.

Bylines now use the registry avatar image and link to the profile url when present, falling back to initials and mailto: as before.

Decisions

  • Path collision — if a content dir is literally named authors, that content wins and author routes are skipped, so no existing site breaks. Covered by a test.
  • Bylines don't link to author pages, per the entry points chosen for this feature; /authors is the way in. It's a two-line change if that should differ.
  • Versioned sites/v1/authors resolves, and the index reflects the pages the server knows about.

Testing

  • bun test — 310 pass, 0 fail (20 new: index grouping, dir labels and fallback, sort order, registry profiles, slug collisions, route resolution including the content-dir collision)
  • chronicle build, --preset static, and both scripts/smoke-test.sh runs (15-page crawl each)
  • Checked the real output: /api/authors JSON, SSR HTML for both routes, the byline with a registry profile, and /data/authors.json from a static build

tsc --noEmit gains three errors: bun:test on the new test file, and two TS2883 h3 inference errors on the new API route — identical to the nine that api/specs.ts and api/page.ts already produce.

🤖 Generated with Claude Code

Adds an optional `authors` registry to chronicle.yaml holding each
author's name, bio, avatar, url, and email. A frontmatter string that
matches a registry key picks up that profile; anything else still reads
as a plain name, so occasional contributors need no config.

/authors lists everyone found in the content, and /authors/<slug> shows
one author's profile followed by their pages grouped by content dir. The
index is served from /api/authors, written to /data/authors.json for
static builds, and embedded in the SSR payload so both routes render
without JavaScript. A content dir named `authors` keeps its own pages.

Bylines now use the registry avatar and profile link when present.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chronicle Ready Ready Preview Aug 19, 2026 10:41am

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a5747bb-ce6c-4303-86aa-cf16fc7ef891

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Also gives the paper-theme example an authors registry entry, so both
themes demonstrate a full profile.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author pages bypass each theme's Page component, so in paper they sat
flat on the neutral backdrop while every other page rendered on a sheet.
Tag the page root with the active theme and, for paper, apply the same
sheet treatment its content uses — base background, side borders, soft
shadow — with the theme's Hanuman body face and Departure Mono for the
meta text.

The profile header now stacks as avatar and name on one line, the bio
below it, then the links.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Paper stacked the avatar byline under the page description. Move the
authors up into the meta line as `1min Read | JANE DOE`, inheriting that
line's mono face and tertiary color, with round avatars.

Bylines now show two authors at most and collapse the rest into a `+N`
counter that names them on hover.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The byline linked out to an author's `url`, or their email, which sent
readers off-site while the author page it should reach went unlinked.
Names now always go to `/authors/<slug>`, keeping the version prefix and
falling back to plain text when a content dir owns that segment. An
author's url and email stay on their page.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author pages aren't MDX, so `/authors/jane.md` 404s and every item in the
menu — copy, view, and both hand-offs — fails silently. Hide it there.

Adds an isAuthorRoute predicate and uses it at the four places that were
each spelling the check out.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rsbh
rsbh merged commit a26adf4 into main Aug 20, 2026
9 checks passed
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