Skip to content

feat(site): publish the docs/ fact sheets at /docs - #621

Merged
5hirish merged 2 commits into
mainfrom
feat/site-docs-port
Dec 3, 2026
Merged

5hirish merged 2 commits into
mainfrom
feat/site-docs-port

Conversation

@5hirish

@5hirish 5hirish commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Merged with placeholder social images, on the maintainer's call (2026-12-03): the eight docs OG cards in site/assets/og/ are September's renders, and two show old titles (docs-credential-storage.jpg, docs-agent-evaluation.jpg). Follow-up: run node scripts/build_og_images.mjs on a Mac (it needs sharp and Georgia) and push the cards. Main was merged in first and every site check re-run on the result.

What and why

The engineering references in docs/ (data model, agent ports and events, credential storage, agent evaluation, the architecture map) are what an evaluator or contributor reads before installing. They were reachable only as raw markdown on GitHub. This change publishes them at getduct.ai/docs the same way the blog is published:

  • Rendering: scripts/build_docs.py pre-renders each source named in docs/factsheets.json into site/docs/.
  • CI: the output is committed, and build_docs.py --check fails CI when it lags behind the source. site.yml now also runs on docs/** and scripts/build_blog.py.
  • Links: a relative link becomes the published page, or the file on GitHub. A link that resolves nowhere fails the build.
  • The architecture map is copied as-is to site/docs/embed/ and shown in an iframe.
  • Footer: a Docs link joins the Resources column.

This is a port of the stale #575 (792 commits behind) onto current main, not a rebase. Main had moved underneath it:

  • GTM: main now adds GTM at the edge, and check-pages.py rejects a page that loads it itself, so the GTM noscript tag is gone.
  • Nav: no nav-docs.html partial. The builder reuses nav-blog.html and swaps its label, and fails loudly if the label moves. The old partial was a one-word copy that had already drifted, so the 5 translated nav copies are gone too.
  • Builder: it imports build_blog.py's helpers (escaping, JSON-LD, partials, inline and table patterns). The block renderer stays separate, because the docs wrap list items at 80 columns and open with their own h1 and byline.
  • Framing: every path now refuses framing, so a /docs/embed/* rule in site/_headers removes the global pair and allows same-origin framing for that path only.

Closes #254

Area

  • backend/ — FastAPI / Python
  • app/ — Next.js
  • desktop/ — Tauri shell / sidecar
  • site/ — static marketing site
  • CI / tooling / docs

Launch

Launch: changelog only, because it is reference material for evaluators and contributors, reachable from the footer and llms.txt.

Verification

python3 scripts/build_docs.py --check          # All 9 files in site/docs/ are up to date and listed.
python3 scripts/build_blog.py --check          # 11 posts, up to date
python3 scripts/build_integrations.py --check  # 13 pages, ok
python3 scripts/build_site_i18n.py --check     # everything current
python3 scripts/i18n/fill.py --check site/i18n/*.po   # ok
python3 .github/scripts/check-pages.py         # 269 pages, 0 errors
python3 scripts/check_changelog_sync.py        # ok
ruff check scripts/build_docs.py               # clean
playwright test tests/e2e/site-smoke.spec.js   # 54 passed, incl. /docs/, /docs/data-model, /docs/architecture, /docs/embed/architecture
  • e2e: the full suite passed 80 and failed 16. All 16 failures are in consent.spec.js, because localtest.me does not resolve in the sandbox it ran in.

  • Browser: pages at 375 and 1366 px had no horizontal overflow and no failed requests, and the architecture iframe rendered.

  • Links: every in-page and cross-doc link points at an id that exists.

  • Not run: build_media_variants.mjs --check (no sharp) and make check-security (no betterleaks).

  • Translations: the "Docs" label was translated by hand (fill.py --provider manual), because no model key was available: Dokumentation, Documentación, ドキュメント, Documentação, 文档.

  • I ran the checks for the areas I touched (see CONTRIBUTING.md)

  • I added or updated tests covering the behaviour that changed

  • I read the AGENTS.md for each directory I edited

  • I read my own diff back looking for the reason to reject it, and read it against the code around it (STYLE.md)

Things that need a second look

  • Changes a convention documented in a CLAUDE.md: site/AGENTS.md updated (the generated-trees table, a Docs pages section, the framing exception)
  • site/_headers: /docs/embed/* uses Cloudflare's ! Header to remove the global X-Frame-Options and CSP, then sets SAMEORIGIN and frame-ancestors 'self'. Neither dev_server nor e2e applies _headers, so check it on a deploy.
  • A gap this does not close: a backend-only PR that renames a file a published doc links to does not trigger site.yml. It merges green, and the push to main then fails the site build on the dead link.

AI assistance

  • An AI coding agent wrote or substantially shaped this change
  • I have read every line of this diff and can explain why each part is there

Generated by Claude Code

The engineering references in docs/ (data model, agent ports and events,
credential storage, agent evaluation, the architecture map) are what an
evaluator or contributor reads before installing, and they were reachable
only as raw markdown on GitHub. scripts/build_docs.py pre-renders each
source named in docs/factsheets.json into site/docs/ the way build_blog.py
renders posts: the output is committed, --check fails CI when it lags, and
a relative link that resolves nowhere fails the build.

Ported from the stale #575 rather than rebased, because main had moved
underneath it: GTM is added at the edge now and check-pages rejects a page
that loads it itself; the nav reuses nav-blog.html with its label swapped
instead of a second partial that had already drifted; the builder imports
build_blog.py's helpers; and since every path now refuses framing, a
/docs/embed/* rule in _headers allows same-origin framing for the
architecture map only.

The eight OG cards are September's renders, copied as placeholders, because
sharp and Georgia are not available where this was built.

Closes #254

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016C6UbnBeepKvyazWkPkqLr
@github-actions github-actions Bot added documentation Improvements or additions to documentation site Static marketing site ci Workflows, scripts and repo hygiene agents Agent instructions and skills labels Nov 30, 2026
@5hirish
5hirish marked this pull request as ready for review December 3, 2026 22:24
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying duct with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8d11aa7
Status: ✅  Deploy successful!
Preview URL: https://c1472d64.duct.pages.dev
Branch Preview URL: https://feat-site-docs-port.duct.pages.dev

View logs

@5hirish
5hirish merged commit 7d9f6e2 into main Dec 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent instructions and skills ci Workflows, scripts and repo hygiene documentation Improvements or additions to documentation site Static marketing site

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish the docs/ fact sheets on getduct.ai/docs, generated from the repository

2 participants