Skip to content

#440 Documentation site (doc.typhondb.io): DocFX build, CI deploy, brand theme - #468

Merged
nockawa merged 2 commits into
mainfrom
feature/436-documentation-sites
Jul 9, 2026
Merged

nockawa merged 2 commits into
mainfrom
feature/436-documentation-sites

Conversation

@nockawa

@nockawa nockawa commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

This PR advances Typhon's documentation on two related fronts, both committed together in d81e743:

  1. The doc site (Stand up the DocFX internals/API/guide site #440, epic User Documentation — pre-alpha readiness #436) — a DocFX site for doc.typhondb.io.
  2. The XML-doc publication pass — the source doc-comments that populate the API reference the site renders.

They're bundled because the API pages are only useful once the XML docs exist. Merging deploys the site to https://doc.typhondb.io (the deploy job runs on push to main; DNS + Pages custom-domain are already configured by the owner).


Part 1 — Documentation site (#440)

Build pipeline — scripts/build-docs.sh + doc/docfx.json (DocFX 2.78.3, pinned as a local tool for local↔CI parity).

  • API reference is read from built assemblies (stage-api-bin.sh → doc/.api-bin/), not recompiled from source — Typhon's public attributes (TraceEvent/BeginParam) are source-generated and would fail DocFX's own Roslyn compile (CS0246).
  • filterConfig.yml documents only the true public surface via the codebase's own Typhon.Engine.Internals boundary (analyzer TYPHON008): 636 → 384 API pages.
  • Aggregates existing sources: Overview (in-depth-overview), Guides (guide + Feature Catalog), Tools (Workbench + CLI), Demos (AntHill), API, Benchmarks (the CI-committed benchmark/reports/).

Robust API TOC — the generated API tree lives under api/ref/ (metadata dest), and a hand-authored, stable doc/api/toc.yml (Overview + a Reference node including ref/toc.yml) sits above it. Because it's never regenerated, the API landing's left TOC survives any build command — including the all-in-one docfx doc/docfx.json --serve. This replaced a fragile post-metadata inject step.

Brand theme — a light custom template (doc/templates/typhon/public/main.css) mirrors the typhondb.io apex: orange #ff8c00 accent (AA-safe #c26900 for link text in light mode), Inter + JetBrains Mono, and the apex's entity-grid mark reused as both favicon and header logo. Plus sitemap.xml, host-root robots.txt, and "Edit this page" links (_gitContribute).

CI/CD — .github/workflows/build-docs.yml (replaces the dead build-documentation.yml):

  • Build Shell (Release) → build-docs.sh → assemble /latest/ bundle + CNAME + root redirect + robots.txt + .nojekyll → upload-pages-artifact → deploy-pages.
  • PRs build-only (verify DocFX compiles); pushes to main build and deploy. Uses GitHub's artifact-based Pages model (no gh-pages branch).
  • Served under /latest/ (relocatable bundles) so versioning can be layered later without rework.

Part 2 — XML-doc publication pass

Public XML documentation across the four shipped assemblies (Typhon.Engine, Typhon.Profiler, Typhon.Protocol, Typhon.Schema.Definition) — this is the ~140 engine .cs files, the source generators, and the .csproj changes in the diff.

  • 2,459 → 0 doc warnings; doc-comment warnings are now promoted to errors on those four csproj's, so the public surface can't regress undocumented.
  • Convention: <see cref="…"/> for type/member refs (not <c>); generics use {…}.
  • Bug fix rolled in: String1024 63-byte boundary bug fixed, with +11 regression tests.

ℹ️ This is what makes the API-reference tab in Part 1 actually useful — without these comments the generated pages would be signatures only.

Deferred (follow-ups, not in this PR)

Verification

Doc build is green on CI (the build job of build-docs.yml on this PR). Brand accent, API TOC (landing + type pages), favicon/header logo, and --serve robustness were all confirmed in a headless browser locally. The heavy aws-gate/pack-check checks run here because of the Part-2 engine changes (as intended).

⚠️ Known pre-existing flake: a CascadeItem cascade-diamond parallel test can intermittently fail aws-gate — if it goes red, confirm it's that flake before assuming a regression.

🤖 Generated with Claude Code

https://claude.ai/code/session_016LWhJqY8FJznYVBjL6uPas

@nockawa
nockawa merged commit c937033 into main Jul 9, 2026
12 checks passed
@nockawa
nockawa deleted the feature/436-documentation-sites branch July 9, 2026 21:53
nockawa added a commit that referenced this pull request Jul 10, 2026
…ing XML docs in Typhon bundle (PR #469)

Fast-follow to #468 (doc.typhondb.io). All doc-site / packaging — no engine logic.

- Dark default + brand accents (main.css/main.js): defaultTheme:'dark' to match the dark-only apex; switcher intact; AA-safe orange links (light #c26900, dark #ff8c00).
- SVG pan/zoom lightbox: click a diagram -> full-screen overlay with true vector pan/zoom via vendored svg-pan-zoom (viewBox/matrix, crisp at any zoom); raster images get bitmap zoom. Fixes "opening an SVG gives no pan/zoom".
- GA4: googleAnalyticsTagId in docfx.json; modern template injects gtag.js into every page <head> at build time. Verified across all page types.
- Bundle sibling XML docs: Typhon.Engine.csproj packs Profiler/Protocol/ Schema.Definition .xml next to their DLLs -> IntelliSense for the whole bundle.
  PACKAGE.md links -> doc.typhondb.io + typhondb.io.
- scripts/build-docs.ps1: native PowerShell twin of build-docs.sh (no Git Bash needed locally); CI still runs the .sh.
- svg-pan-zoom BSD-2 LICENSE reproduced verbatim (vendor/svg-pan-zoom.LICENSE.txt).
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