Skip to content

feat: add page authors from frontmatter - #171

Open
rsbh wants to merge 1 commit into
mainfrom
feat/authors
Open

feat: add page authors from frontmatter#171
rsbh wants to merge 1 commit into
mainfrom
feat/authors

Conversation

@rsbh

@rsbh rsbh commented Aug 19, 2026

Copy link
Copy Markdown
Member

Pages can now say who wrote them.

---
title: Getting Started
authors:
  - Jane Doe <jane@example.com>
  - Sam Patel
---

Each entry is a plain string — Name <email> or a bare name. A lone string works for the single-author case (authors: Jane Doe). Anything that isn't a recognizable Name <email> is treated as a literal name, so an occasional contributor can add a byline without any config.

Where authors show up

  • Page byline — avatar + name under the title in the default theme, centered under the description in paper. Links to mailto: when an email is given.
  • Structured dataauthor Person entries in the Article JSON-LD.
  • Social card — a By … line on the generated OG image, in both the server route and static builds.

Avatars come from the author's initials via Apsara's Avatar fallback — no image is fetched, so this works offline and in air-gapped builds. Rendering real profile pictures would need a place to declare them (an authors registry in chronicle.yaml); this PR deliberately keeps everything in frontmatter.

Testing

  • bun test — 290 pass, 0 fail (14 new for the parser: shorthand, bare name, whitespace, non-email angle brackets, email-only, empty, lone string, non-string entries, initials)
  • chronicle build plus both scripts/smoke-test.sh runs (15-page crawl each), and --preset static
  • Rendered output checked directly: byline HTML in both themes, the JSON-LD author array, the authors OG param on the meta tag, and the OG PNG itself in both the server route and a static build

Note

tsc --noEmit gains one error — Cannot find module 'bun:test' on the new test file, matching every existing test file (repo-wide tsconfig gap, not introduced here).

🤖 Generated with Claude Code

Pages can declare who wrote them with an `authors` list of plain strings,
each either `Name <email>` or a bare name. A lone string is accepted for
the single-author case.

Authors render as an avatar-and-name byline in both themes, as Person
entries in the page's Article structured data, and as a line on the
generated social card in server and static builds alike. Avatars are
drawn from the author's initials, so nothing is fetched over the network.

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 8:56am

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@rsbh, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 46f6a608-14ad-4d81-90d6-00806d74335c

📥 Commits

Reviewing files that changed from the base of the PR and between 170a5e1 and f05c3cb.

📒 Files selected for processing (17)
  • docs/content/docs/frontmatter.mdx
  • examples/basic/content/docs/getting-started.mdx
  • examples/versioned/content/docs/guide.mdx
  • packages/chronicle/src/cli/commands/static-generate.ts
  • packages/chronicle/src/components/common/author-byline.module.css
  • packages/chronicle/src/components/common/author-byline.tsx
  • packages/chronicle/src/lib/authors.test.ts
  • packages/chronicle/src/lib/authors.ts
  • packages/chronicle/src/lib/head.tsx
  • packages/chronicle/src/lib/source.ts
  • packages/chronicle/src/pages/DocsPage.tsx
  • packages/chronicle/src/server/routes/og.tsx
  • packages/chronicle/src/themes/default/Page.module.css
  • packages/chronicle/src/themes/default/Page.tsx
  • packages/chronicle/src/themes/paper/Page.module.css
  • packages/chronicle/src/themes/paper/Page.tsx
  • packages/chronicle/src/types/content.ts

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.

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.

1 participant