initial work #1

Merged
james merged 5 commits from feat/activitypub-comments into main 2026-05-26 00:43:43 +00:00
Owner

Totally created by Claude with some small nudges by me. Untested so far.

Totally created by Claude with some small nudges by me. Untested so far.
Add a reusable Hugo Module that displays Mastodon replies as a
client-side comment thread, with no backend. A post is linked to a
toot via front matter; readers click "Load comments" to fetch the
reply thread from /api/v1/statuses/{id}/context and render it.

- layouts/partials/activitypub-comments.html: the partial sites call;
  passes config via data-* attributes and builds JS/CSS/DOMPurify
  through Hugo Pipes (minify + sha512 fingerprint + SRI)
- assets/js/activitypub-comments.js: fetch, thread by in_reply_to_id,
  OP badge, custom emoji, DOMPurify sanitization, error/empty states
- assets/js/vendor/purify.min.js: bundled DOMPurify 3.2.4 (no CDN)
- assets/css/activitypub-comments.css: ap-namespaced, themeable
- i18n/en.toml: translatable UI strings
- exampleSite/: runnable demo (verified to build with Hugo 0.161.1)
- README, LICENSE (MIT)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- .forgejo/workflows/ci.yml: on push/PR, syntax-check the JS and build
  the exampleSite with Hugo extended, asserting the partial renders and
  Pipes assets are emitted
- .forgejo/workflows/release.yml: on v* tags, build a changelog from the
  commit log and create a Forgejo Release via the API using the injected
  job token (pre-release for hyphenated tags)
- README: add CI badge

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chore: rename module/repo to hugo-ap-comments
Some checks failed
CI / build (pull_request) Failing after 5s
4179c2c995
Repo lives at forge.wynning.tech/james/hugo-ap-comments, so the Go
module path must match for `hugo mod get` to resolve. Updated go.mod,
exampleSite module import/replace, README install docs + CI badge, and
demo strings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix workflow images
Some checks failed
CI / build (pull_request) Failing after 23s
b5e0d81cfe
fix(ci): match minified attribute in verify step
All checks were successful
CI / build (pull_request) Successful in 25s
25ca3b553c
`hugo --minify` strips quotes from HTML attribute values, turning
id="ap-comments" into id=ap-comments, so the verify grep never matched.
Match either form.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
james merged commit a28a2321bd into main 2026-05-26 00:43:43 +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!1
No description provided.