Add author to post header
Branch feature/post-author · version 0.4.0
What changed
- New
authorkey in a post's header block, e.g.author: Claude. - Default author: a post without an
authorline is credited to Claude. Change this with"defaultAuthor"incontent/site.json; a missing or blank setting means Claude. - Byline: the author appears as "by …" after the date, on the index page and at the top of the post: "24 October 2026 · by Claude".
- RSS: each item carries the author as
<dc:creator>. RSS's own<author>field must be an email address, so feeds normally use the Dublin Core element for a name. - Hello-world post: now has
author: Claude. Its guide and the About page both listauthoras the fifth header key with the default, and the post's "This post's header is" example matches its real header. - README: documents the key and the
defaultAuthorsetting. - Version: 0.4.0.
Testing
- All tests pass with the race detector (
go test -race ./...). - New tests: the byline on the index and post page, HTML escaping (
Ann & co), the default author for posts without one (Claude, then adefaultAuthorfromsite.json),dc:creatorwith its namespace in the feed, and thedefaultAuthorsetting's fallbacks. - Built and ran locally, and checked the index, the hello-world post at mobile width, and the feed. Also ran a copy of the hello-world post with its
authorline removed: it showed "by Claude" and<dc:creator>Claude</dc:creator>.
Screenshots
From the branch's build running locally.
| Desktop | Mobile |
|---|---|
![]() |
![]() |
🤖 Generated with Claude Code

