Skip to content

docs: publish the guides, the READMEs and the API to GitHub Pages with DocFX - #138

Merged
CaffeinatedCoder merged 6 commits into
release/2.3.0from
docs/docs-site
Oct 29, 2026
Merged

CaffeinatedCoder merged 6 commits into
release/2.3.0from
docs/docs-site

Conversation

@CaffeinatedCoder

@CaffeinatedCoder CaffeinatedCoder commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #115

Problem

You could only read the consumer docs as Markdown on GitHub. That meant no menu beyond the README's Documentation table, no search across the 16 guides and 7 package READMEs, and no API reference outside an IDE.

Change

  • .github/workflows/docs.yml builds the site with DocFX and deploys it to GitHub Pages on a push to main only. main is the released state, so the site always shows the version dotnet add package installs. A pull request into main or release/** that touches what a page is built from builds the site with --warningsAsErrors and publishes nothing.

  • site/ holds the setup:

    • docfx.json lists the content (docs/*.md, README.md, src/*/README.md, CHANGELOG.md) and the API metadata of the five run-time packages, read from one publish folder.
    • toc.yml is the menu: Home, Guides in the README's order, Reference (the package READMEs), API, Changelog.
    • template/conceptual.extension.js does the link rewrite described below.
  • DocFX 2.81.0 is pinned in .config/dotnet-tools.json.

  • The sources are not copied or edited. A link to a repository file that is not a page (design/, CONTRIBUTING.md, AGENTS.md, SECURITY.md, LICENSE) is added to the build as a resource, so DocFX still checks the file exists. The template then rewrites it, at build time, to https://github.com/.../blob/<built commit>/.... The workflow deletes the resource copies from the output. A build without --metadata _commit=<sha> fails with a message saying what to pass.

  • One page edit: the README's directory link spikes/ became https://github.com/CaffeinatedCoder/CodoMetis.TypeKit/tree/main/spikes. DocFX can't check a directory link; DocumentationLinkTests checks the absolute address.

  • Spike: DocFX lists the members of C# 14 extension blocks. Each one appears as an extension method on its static class and under "Extension Methods" on the type it extends, with its XML docs. The gaps, recorded in the decision:

    • Signatures are shown in their lowered form.
    • Members whose constraints the open type doesn't meet (OrDefault, OrNull) appear only on Option's page.
    • The one static block member, New(), shows as GuidValueExtensions.New<TSelf>().

    So the API pages ship. A workflow step fails if Option<T>'s or Result<T, TError>'s page stops listing its extension Select.

  • CI lanes: site/** joins the prose class in tools/CiLanes, because the docs workflow and the conventions tests read it and nothing is built from it. ProseReaderTests now counts a "site" literal as prose. The new workflow stays "unlisted" like every other workflow (decision 113). The SelectionTests rows cover the new paths.

  • DocsSiteTests (conventions, prose suite) holds:

    • the menu's Guides to the README's Documentation table, in order;
    • the menu's Reference to every shipping package's README;
    • the API metadata to every run-time package, with Analyzers and Generators exempt, each with a reason.
  • Docs: decision record 0116, a README paragraph linking the site, a changelog line, and a CONTRIBUTING section on how the site is published and how a second line (/2.x/, /3.x/) would be added.

  • No claim in test/oracles/ changes: the site adds no public member, and the new README sentence promises nothing about the library's API.

GitHub Pages is configured: Source is "GitHub Actions" (the API reports build_type: workflow, https://caffeinatedcoder.github.io/CodoMetis.TypeKit/). The first live deploy happens when the 2.3.0 release merges into main; the README and changelog links to the site go live then.

ADR number: the record is 0116; #136 merged 0115 into release/2.3.0 first, and this branch has merged it.

Tests

  • Link check, seeded locally: three seeds each failed dotnet docfx site/docfx.json --warningsAsErrors (exit 255); without them the build reports 0 warnings:
    • a link to a missing page (InvalidFileLink);
    • a link to a missing heading of a page (InvalidBookmark);
    • a link to a missing design record (InvalidFileLink, through the resources).
  • Link check, seeded in CI: 8dfe0a9 seeded a link to a missing page; the Docs check failed on it with InvalidFileLink ... no-such-page.md, exit 255. 546ac9c removed it.
  • Rendered site: served locally. The menu renders, the design links open on GitHub at the commit, and search finds both guides and API pages (e.g. "materializer").
  • CiLanes: 93 tests pass. Seeding site/** back out of the prose class fails the 3 new rows.
  • DocsSiteTests / ProseReaderTests: 17 tests pass. Seeding a guide dropped from toc.yml, a package dropped from docfx.json, and "site" dropped from the prose detection fails one test each.
  • Conventions classes affected (DocumentationLink, ReadmeSample, DesignRecord, Changelog, ReleaseWiring, CiLane, CiWithoutAi, PortableFileName, ShellScript): 1,461 pass. Oracles tests: 27 pass. DocsQuery tests: 106 pass.

🤖 Generated with Claude Code

…h DocFX

.github/workflows/docs.yml builds docs/*.md, the root README, the package
READMEs, CHANGELOG.md and the API pages of the five run-time packages with
DocFX 2.81.0 (pinned in .config/dotnet-tools.json, configured in site/), and
deploys them on a push to main only. A pull request touching a page builds
it with --warningsAsErrors and publishes nothing.

The sources are not copied or edited. A link to a repository file that is
not a page (design/, CONTRIBUTING.md) is a build resource, so DocFX checks
it exists, and site/template rewrites it to a GitHub address at the built
commit. The README's one directory link, spikes/, is now an absolute
address on main.

Spike: DocFX lists the members of C# 14 extension blocks as extension
methods, on their static class and on the type they extend; the workflow
fails if Option<T> or Result<T, TError> stops listing them.

site/** joins the prose lane in tools/CiLanes, ProseReaderTests counts
"site" as prose, and DocsSiteTests holds the menu to the README's tables
and the API pages to the run-time packages. Decision 115.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CaffeinatedCoder CaffeinatedCoder added this to the 2.3.0 milestone Oct 29, 2026
@CaffeinatedCoder CaffeinatedCoder added documentation Improvements or additions to documentation area/release Versioning, changelogs, packaging and release wiring labels Oct 29, 2026
Reverted by the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CaffeinatedCoder and others added 4 commits October 29, 2026 14:14
The Docs check failed on it with InvalidFileLink (run 40879451445).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#136 took decision 0115, so the docs site's record is renumbered to 0116:
the file, its heading, its index row and every link to it. Both changelog
lines and both index rows kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both changelog lines kept: #137's CMTK0009 entry and the docs site's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, packaging and release wiring documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant