Repository navigation
feat: list the latest blog posts on /blog/ - #209
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
magnus-madsen
force-pushed
the
blog-latest-posts
branch
from
August 8, 2026 21:05
e15affb to
5ac63a7
Compare
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <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.
/blog/was a stub that linked to blog.flix.dev and nothing else. It now lists the five newest posts — title, date, and summary, each deep-linking to the post — with the link to the full blog kept above and below the list.Where the data comes from
blog.flix.dev now publishes
atom.xmlandrss.xml. This uses Atom: the RSS feed inlines every post in full (137 KB against 6.8 KB for the same eight titles) and dates entries in RFC-822, whichDate.parseis not obliged to accept.build-scripts/fetchBlogPosts.mjsdownloads the feed intosrc/data/before Astro runs, exactly asfetchGrammar.mjsdownloads the TextMate grammar intosrc/grammars/. Both now sharefetchOnce.mjs, so they behave identically:Because the feed is on disk before the build starts, the page reads it synchronously and the render never touches the network.
Two traps worth knowing about
blog.flix.dev answers paths it does not have with its index page and status 200, not a 404. The status therefore cannot distinguish a feed from a web page, so the fetch validates the body and fails loudly if it is not an Atom feed. Without this, a feed that moved or was turned off would parse as HTML and silently yield no posts.
Bumping
COMMITinfetchGrammar.mjshas never been enough on its own — the skip-if-exists check runs before anything looks at the SHA, so a working tree that has already built keeps the old grammar until the file is deleted. Pre-existing behaviour; the comment that claimed otherwise is corrected here and the rule is documented.Verified
already exists, skipping fetchFailed to fetch …: fetch failed, exit 1… but it is not an Atom feed, exit 1Parsed zero entries out of …, exit 1npm run checkis clean (0 errors, 0 warnings, 0 hints), and every command in the new docs was run verbatim.Also in here
npm run fetchruns both fetches, sodev/build/checkname one prelude step instead of a growing chain.build-scripts/README.md(new) and an External Resources section inREADME.mddocument what is downloaded, that it is kept forever, and how to refresh it./blog/staysnoindexand out of the sitemap, since the posts themselves live on blog.flix.dev; the comment inastro.config.mjsjustifying that is updated, as it described the page as a stub.Note for whoever deploys
The feed is fetched once and never refreshed. That is fine for a fresh clone or a CI run, which is how this is expected to build, but if production deploys from a long-lived working directory the post list would freeze at whatever the first build fetched. That case needs
rm src/data/blog-atom.xmlin the deploy step.🤖 Generated with Claude Code