blog: Atom feed at /blog/feed.xml + index discovery link#48
Open
daliu wants to merge 1 commit into
Open
Conversation
Top backlog item from the blog-enhancement loop. build_blog.py now emits blog/feed.xml (Atom 1.0, newest-first, escaped HTML content, tags as categories) alongside the post pages, and the blog index <head> carries <link rel="alternate" type="application/atom+xml"> for feed discovery — injected idempotently into existing chrome by splice_index, so no full index regeneration was needed. Deterministic on purpose: feed-level <updated> is the newest post's date (fixed epoch when empty), so unchanged sources rebuild byte-identical and --check stays quiet. Includes the rebuilt output (feed.xml, index head line) and the sitemap re-merge — the blog URLs had dropped out of master's sitemap.xml; running the build restored them via the existing additive merge. tests/test_build_blog.py: +15 tests (feed structure via ElementTree, escaping, categories, determinism, discovery-link injection + idempotency, build outputs). Full suite: 159 passed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Top unchecked item from the blog-enhancement backlog: RSS/Atom feed at
/blog/feed.xml(+<link rel="alternate">in the index head).scripts/build_blog.pynow emitsblog/feed.xml(Atom 1.0) on every build: newest-first entries with title, alternate link, id, RFC-3339updated,summaryfrom the description,<category>per tag, and the rendered post body escaped inside<content type="html">.<head>gets<link rel="alternate" type="application/atom+xml" ...>for feed autodiscovery.splice_indexinjects it idempotently into existing chrome (after the canonical link), so the hand-preserved index didn't need a full regeneration. Post pages are unchanged — the backlog item scopes discovery to the index.<updated>is the newest post's date (fixed epoch when empty) — no wall-clock, so unchanged sources rebuild byte-identical and--checkstays quiet.Included rebuilt output
blog/feed.xml(new), one-line head addition inblog/index.html.sitemap.xml: the blog URLs (/blog/,/blog/welcome.html) had dropped out of master's sitemap; running the build restored them via the existing additivemerge_sitemap(no non-blog entries touched).Tests
+15 tests in
tests/test_build_blog.py: Atom well-formedness (parsed with ElementTree), entry fields, HTML-content escaping, tag→category mapping, empty-feed validity, determinism, discovery-link presence/injection/idempotency, andbuild()outputs. Full suite: 159 passed.Per the loop rules: base
master, do not merge — awaiting Dave's review.🤖 Generated with Claude Code