Skip to content

feat(docs): server-rendered dates, FAQPage, WebSite @id and an index drift check - #247

Merged
alexevladgabriel merged 9 commits into
feat/fumadocs-nextfrom
feat/docs-seo-ai
Dec 3, 2026
Merged

alexevladgabriel merged 9 commits into
feat/fumadocs-nextfrom
feat/docs-seo-ai

Conversation

@alexevladgabriel

@alexevladgabriel alexevladgabriel commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

SEO and AI metadata for the new docs.

  • "Last updated" is rendered on the server as <time datetime>; Fumadocs filled it in only in the browser, so crawlers saw no date.
  • TechArticle's isPartOf references https://pelican.dev/#website, the WebSite node the Hub's pages define.
  • FAQPage JSON-LD for pages with faq: true (troubleshooting now), built from the page's own sections.
  • check:indexes runs after the build: the sitemap, llms.txt and llms-full.txt must list exactly the built pages, with canonical URLs.
  • Removes the llms.txt link to hub.pelican.dev/docs/api (404 today; the Hub fix is in pelican/hub).
  • The 404 page's share image points at a file the Hub serves, and check-paths now scans 404.html.

Checks: bun test 185 pass, bun run typecheck and bun run build pass.

Note

Add FAQPage JSON-LD, server-rendered doc dates, WebSite @id, and index drift checks

  • Docs pages with faq: true frontmatter (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 content
  • Replaces Fumadocs' PageLastUpdate with a local LastUpdated component in page.tsx, so the date renders in server HTML with an ISO dateTime
  • Adds WebSite @id to TechArticle JSON-LD isPartOf in lib/og.ts, and fixes the 404 page and llms.txt to use the docs OG image and drop the stale Hub API link
  • New check:indexes script (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 drift
  • check-paths.mjs now also covers 404.html for external-resource paths
  • Behavioral Change: postbuild fails if sitemap or llms.txt drifts from the built pages; faq frontmatter is optional and no page changes behavior unless it opts in

Macroscope summarized 09e7d06.

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.
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4b6f5971-eca4-4438-b64a-2fc04a8d4082

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@macroscopeapp

macroscopeapp Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Approved at 4ea78b8

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 09e7d06. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

…cs-seo-ai

# Conflicts:
#	app/docs/[[...slug]]/page.tsx
@alexevladgabriel
alexevladgabriel merged commit 9b2376d into feat/fumadocs-next Dec 3, 2026
4 checks passed
@alexevladgabriel
alexevladgabriel deleted the feat/docs-seo-ai branch December 3, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant