Skip to content

Publish the 3.x and 4.x documentation side by side - #1050

Merged
FreeApophis merged 2 commits into
mainfrom
versioned-documentation
Nov 5, 2026
Merged

FreeApophis merged 2 commits into
mainfrom
versioned-documentation

Conversation

@FreeApophis

@FreeApophis FreeApophis commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Resolves #1046

main already contains the 4.0 breaking changes and every push to main deploys the book, so the live documentation currently describes unreleased behaviour (and λ1202 / λ1203, still reported by the shipped analyzers, return 404).

What changes

  • Two books in one deployment. GitHub Pages is deployed as a single artifact, so one workflow run builds every version. The workflow checks out the 3.x documentation (STABLE_DOCUMENTATION_REF, the branch release/3.8.x) next to main.
    • /funcky/book/ is the stable 3.x book (default)
    • /funcky/book/4.x/ is the book from main, labelled "4.x (preview)"
  • Version switcher. Website/book/version-switcher.js is injected into every book by the build script, so the 3.x sources need no change. It stays on the same page when the other version has it and falls back to the start of that book otherwise.
  • Analyzer rule redirects. The analyzers link to /funcky/analyzer-rules/{id}.html, but only λ0001 had a redirect. The build now generates one for every rule page found in any book; a rule goes to the default book, or else to the first book that documents it.
  • Folding (Fold the subchapters in the rendered documentation #1047) is applied to all books through the build script, so that the 3.x book gets it too.
  • workflow_dispatch is added to redeploy after a change to the 3.x documentation.

When 4.0.0 is released

Swap the two entries of books in Website/build.fsx: 4.x moves to book, 3.x to book/3.x, 4.x is listed first.

Notes

  • 3.x documentation fixes go to release/3.8.x; the companion PR against that branch redeploys the website after such a change.
  • The old docs.yml on release/3.8.x would deploy the single-book site on a 3.x tag; the companion PR removes that.
  • Locally I verified that the script compiles and generates the 27 redirects; mdBook is not installed locally, so the book builds and the switcher are only exercised by CI.

FreeApophis and others added 2 commits November 5, 2026 10:46
The website now contains one book per major version, a version switcher
in the menu bar of each book, and a redirect for every analyzer rule.

Resolves #1046

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@FreeApophis
FreeApophis merged commit b1631c9 into main Nov 5, 2026
11 checks passed
@FreeApophis
FreeApophis deleted the versioned-documentation branch November 5, 2026 10:35
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.

Should we split the documentation in a 3.x and 4.x branch?

2 participants