feat: allow site-level host/username, require only id per post #4

Merged
james merged 1 commit from feat/site-level-host into main 2026-05-26 03:48:22 +00:00
Owner

host and username are the same for every post, so resolve them from
params.activitypub_comments with a per-post override. Front matter now
only needs comments.id.

Also fix a latent guard bug: a missing id used to stringify to ""
(truthy) via printf; now it's treated as empty so a post without an id
correctly renders nothing.

  • partial: host/username default from site params; id-empty check fixed
  • hugo.toml: document host/username defaults
  • README: document the recommended site-level setup + per-post override
  • exampleSite: demonstrate site-level config; add CI fixture posts for
    per-post override and missing-id
  • ci.yml: assert site-level resolution, per-post override, and that a
    post without an id renders no comments section

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

host and username are the same for every post, so resolve them from params.activitypub_comments with a per-post override. Front matter now only needs comments.id. Also fix a latent guard bug: a missing id used to stringify to "<nil>" (truthy) via printf; now it's treated as empty so a post without an id correctly renders nothing. - partial: host/username default from site params; id-empty check fixed - hugo.toml: document host/username defaults - README: document the recommended site-level setup + per-post override - exampleSite: demonstrate site-level config; add CI fixture posts for per-post override and missing-id - ci.yml: assert site-level resolution, per-post override, and that a post without an id renders no comments section Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat: allow site-level host/username, require only id per post
All checks were successful
CI / build (pull_request) Successful in 23s
039c4c7455
host and username are the same for every post, so resolve them from
params.activitypub_comments with a per-post override. Front matter now
only needs comments.id.

Also fix a latent guard bug: a missing id used to stringify to "<nil>"
(truthy) via printf; now it's treated as empty so a post without an id
correctly renders nothing.

- partial: host/username default from site params; id-empty check fixed
- hugo.toml: document host/username defaults
- README: document the recommended site-level setup + per-post override
- exampleSite: demonstrate site-level config; add CI fixture posts for
  per-post override and missing-id
- ci.yml: assert site-level resolution, per-post override, and that a
  post without an id renders no comments section

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
james merged commit 3128fe1274 into main 2026-05-26 03:48:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
james/hugo-ap-comments!4
No description provided.