Repository navigation
feat(docs): server-rendered dates, FAQPage, WebSite @id and an index drift check - #247
Conversation
Fumadocs' PageLastUpdate fills the date in after hydration, so the built page said "Last updated on" with no date. Render the git date on the server as <time datetime>, in the same muted text.
The docs' JSON-LD named the site without an @id, so it read as a second, separate WebSite. Reference https://pelican.dev/#website like the Hub's pages do, keeping the name and URL so the node still reads on its own.
A page opts in with faq: true in its frontmatter (new key in source.config.ts). Each ## section becomes a question (the heading) and its answer (the section's text), taken from the page's Markdown, the same text as llms-full.txt, and written as plain text. Headings are checked against the page's table of contents, so a tab label written as a heading stays part of its answer. zod is now a direct dependency for the schema (already installed with Fumadocs, same version).
One frontmatter line (faq: true): its sections are already written as problems and their fixes.
https://hub.pelican.dev/docs/api answers 404, and the Hub publishes no other API reference (/docs/api.json, /api.json and /_scramble/ are 404 too). Add it back once the Hub serves one.
The Hub shows this page for a missing /docs/ path, but its og:image and twitter:image were /og/home.png, the interim landing pages' card, which pelican.dev doesn't serve from this build. Use the docs' own card, /docs/og/image.png.
404.html is served by the Hub for every missing /docs/ path, but only the docs pages were checked for loads outside /docs/, so its share image pointing at /og/home.png went unnoticed.
…t from the pages A new post-build check compares the docs sitemap, llms.txt (and its copy docs/llms.txt) and llms-full.txt with the built pages: every page listed once, nothing listed that isn't built, and URLs in canonical form (https://pelican.dev/docs/<page>/; llms.txt links each page's .md, which must be in the build). It also checks each page's canonical link. It runs in postbuild after check-links, so CI and the publish workflow run it.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This improves documentation dates and structured metadata and adds build checks for index drift and 404 assets. The changes are confined to public documentation and read-only build validation, with no material operational or customer-data exposure. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
…cs-seo-ai # Conflicts: # app/docs/[[...slug]]/page.tsx
SEO and AI metadata for the new docs.
<time datetime>; Fumadocs filled it in only in the browser, so crawlers saw no date.isPartOfreferenceshttps://pelican.dev/#website, the WebSite node the Hub's pages define.faq: true(troubleshooting now), built from the page's own sections.check:indexesruns after the build: the sitemap, llms.txt and llms-full.txt must list exactly the built pages, with canonical URLs.Checks:
bun test185 pass,bun run typecheckandbun run buildpass.Note
Add FAQPage JSON-LD, server-rendered doc dates, WebSite @id, and index drift checks
faq: truefrontmatter (schema added in source.config.ts) generate FAQPage JSON-LD from depth-two headings; lib/faq.ts extracts question-answer pairs and converts Markdown to plain text, including fenced code contentPageLastUpdatewith a localLastUpdatedcomponent in page.tsx, so the date renders in server HTML with an ISOdateTime@idto TechArticle JSON-LDisPartOfin lib/og.ts, and fixes the 404 page and llms.txt to use the docs OG image and drop the stale Hub API linkcheck:indexesscript (check-indexes.mjs) runs in postbuild and validates canonical links, the sitemap, and llms.txt page lists against the built docs pages; it fails the build on drift404.htmlfor external-resource pathsfaqfrontmatter is optional and no page changes behavior unless it opts inMacroscope summarized 09e7d06.