feat(seo): add an llms.txt site index and alias the conventional feed paths - #182
Conversation
|
Warning Review limit reachedNext included review available in 46 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds a generated Changesllms.txt site index
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This adds a prerendered plain-text site index and redirects legacy feed aliases to the canonical blog feed. The generated links, response type, and redirect targets are covered, with no remaining merge-blocking risk identified. Sequence Diagram(s)sequenceDiagram
participant Client
participant llms.txtRoute
participant ContentCollection
participant buildLlmsTxt
Client->>llms.txtRoute: Request /llms.txt
llms.txtRoute->>ContentCollection: Query articleEntries ordered by date
ContentCollection-->>llms.txtRoute: Return article entries
llms.txtRoute->>buildLlmsTxt: Pass blog posts and SITE_ORIGIN
buildLlmsTxt-->>llms.txtRoute: Return plain-text index
llms.txtRoute-->>Client: Return text/plain response
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (4 skipped: 4 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Preview sitepr-182: https://pr-182--stuartclark.netlify.app Updated 2026-09-09T11:05:25Z |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #182 +/- ##
=======================================
Coverage 99.77% 99.77%
=======================================
Files 79 81 +2
Lines 1323 1340 +17
Branches 332 332
=======================================
+ Hits 1320 1337 +17
Misses 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Lighthouse Audit ·
|
| Route | FCP | LCP | CLS | TBT | Perf |
|---|---|---|---|---|---|
/ |
✅ 2.7s |
✅ 3.0s |
✅ 0.009 |
✅ 19.000 |
✅ 0.90 |
/about |
✅ 2.6s |
✅ 3.2s |
✅ 0.178 |
✅ 1.500 |
✅ 0.81 |
/community |
✅ 2.7s |
✅ 2.7s |
✅ 0.016 |
✅ 0.000 |
✅ 0.92 |
/open-source |
✅ 2.7s |
✅ 4.8s |
✅ 0.000 |
✅ 0.000 |
✅ 0.78 |
/writing |
✅ 2.7s |
✅ 2.9s |
✅ 0.000 |
✅ 4.000 |
✅ 0.91 |
/writing/custom-formatters-410-20260731 |
✅ 2.9s |
✅ 3.4s |
✅ 0.063 |
✅ 0.000 |
✅ 0.86 |
/writing/decoupling-configuration-config-pages-20220412 |
✅ 2.7s |
✅ 3.0s |
✅ 0.015 |
✅ 0.000 |
✅ 0.90 |
/writing/drupal-site-settings-over-jsonapi-consumer-20260826 |
✅ 2.9s |
✅ 3.4s |
✅ 0.159 |
✅ 0.000 |
✅ 0.80 |
/writing/druxt-drupal-13x-resource-list-yours-20260909 |
✅ 3.2s |
✅ 3.5s |
✅ 0.058 |
✅ 0.000 |
✅ 0.84 |
/writing/field-tokens-200-20260722 |
✅ 2.7s |
✅ 2.8s |
✅ 0.019 |
✅ 0.000 |
✅ 0.91 |
/writing/hello-world-20211126 |
✅ 2.9s |
✅ 3.0s |
✅ 0.142 |
✅ 0.000 |
✅ 0.84 |
/writing/jsonapi-views-120-20260812 |
✅ 2.7s |
✅ 2.8s |
✅ 0.005 |
✅ 0.000 |
✅ 0.91 |
/writing/layout-paragraphs-module-20220301 |
✅ 2.7s |
✅ 2.7s |
✅ 0.055 |
✅ 0.000 |
✅ 0.91 |
Thresholds: FCP ≤ 3.5s, LCP ≤ 5.0s, CLS ≤ 0.25, TBT ≤ 600.000, Perf ≥ 0.75
|
Added the CI concurrency fix to this branch ( Unlighthouse defaults The evidence that this is measurement rather than the site: Also included, since it is the same defect in a different tool: Playwright defaults workers to half the cores too. On GitLab that meant 9 workers and produced 34 test timeouts with 6 "Page crashed" and no pixel diffs. That page is genuinely marginal regardless, and worth its own look — its CLS of 0.159 and LCP are the worst on the site, and the v1.6.0 changelog records its screenshots already being quantized once to clear this same budget. Serialising the audit removes the measurement noise on top of that, so the number this reports now is the page's own. |
Two discoverability gaps found while looking at where the site's traffic actually comes from. Mirrors GitLab
!61./llms.txtA plain-text site index in the llmstxt.org format: an H1, a blockquote summary, then
## Writing,## Pagesand## Optionalsections of- [name](url): descriptionlinks. Generated from the content collection at prerender time, so it cannot drift from the articles that exist.chatgpt.comalready shows up as a referrer and organic search brings 13 sessions a year, so assistant citation is plausibly the more interesting of the two channels. Until now the only machine-readable map of the site wassitemap.xml, which carries URLs and no descriptions.Article and page links are UTM-tagged (
utm_source=llms-txt&utm_medium=ai&utm_campaign=syndication), mirroring what the RSS feeds already do. That is deliberate: the standard's adoption is not settled, and the tagging is the only way to find out whether the file earns its place rather than guessing later. Per-page<link rel="canonical">means the extra params cost nothing in search. The two RSS links are left bare, since a subscriber's client refetches them and never "arrives" from one./feed.xmland/rss.xml→/blog.xmlBoth returned 404.
/blog.xmlis the real feed and is advertised in<head>, so nothing correct was broken, but feed readers, browser extensions and link checkers try the conventional names first. Aliased with a 301 rather than moving the canonical path, which Planet Drupal and existing subscribers depend on.Forced (
301!) inpublic/_redirectsand mirrored inpublic/serve.json, both from review on the GitLab side:dist/feed.xmlordist/rss.xmlstub, apparently because it skips prerendering routes carrying a file extension, so the aliases already worked. Forced anyway because the/articles/*rules above them exist precisely because this repo shipped that bug once, and nothing stops a future change from making these prerender too.serve.jsonmatters because the Playwright suite runsserve -s dist, which reads that file and knows nothing about Nitro routeRules. Without it the aliases 404 locally while production redirects. Verified after the change:301 -> /blog.xmlfor both underserve.Verification
Checked against real build output, not just config:
dist/_redirectscontains both 301s;dist/llms.txtgenerates (5.5 kB);dist/_headerscarries itstext/plain; charset=utf-8llmsTxt.tsandllms.txt.get.tsat 100% statements/branches/functions/lineslint:all,typecheckandhighlight:checkall exit 0Note on the base branch
This targets
mainbecausedevelopno longer exists on this remote — it was deleted when #178 squash-merged it intomainthis morning.main's tree is byte-identical to GitLab'sdevelop, so these two commits cherry-picked onto it cleanly. Happy to retarget ifdevelopgets recreated.Summary by CodeRabbit
New Features
/llms.txtplain-text site index containing links to articles, pages, and RSS feeds./llms.txtwith the correct plain-text content type.Bug Fixes
/feed.xmland/rss.xmlnow permanently redirect to the canonical/blog.xmlfeed.Tests