Skip to content

feat: compose saved editions into one versioned site - #381

Merged
brendanclement merged 17 commits into
mainfrom
brendan/compose-versioned-site
Oct 23, 2026
Merged

brendanclement merged 17 commits into
mainfrom
brendan/compose-versioned-site

Conversation

@brendanclement

@brendanclement brendanclement commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

We now save documentation for a release, but those editions still need to become one website that readers can browse by product and version.

This PR adds make compose to build that site using Mintlify's product and version selectors. Each edition keeps its pages, badges and drafts, and gets an About this version page. Links and assets stay within the selected edition; old unversioned links go to the preferred Enterprise edition.

compose.yaml chooses the preferred editions. Adding a release does not change that choice automatically. The composer checks saved-edition checksums and rejects unsafe links, redirect loops and unsupported link syntax.

Links are found with Mint's MDX parser. Preparation checks the pinned pages and snippets before saving them: components must spell out attributes, and property spreads and calculated links are refused. Code examples and drafts are unaffected.

Shared site settings, logos, styles and the existing cookie-consent script are copied into this repository so changing the preferred edition doesn’t change the site’s appearance or behavior. These are copied verbatium which is why you see css, images, etc. here

Next Steps

  • Connect the composed site to staging and approved production promotion
  • Prepare editions from qualified releases
  • Remove shared site settings, logos, styles and cookie-consent from lancedb/lancedb

@brendanclement
brendanclement force-pushed the brendan/compose-versioned-site branch from 570b2ae to 69c403b Compare October 22, 2026 20:11
@brendanclement
brendanclement marked this pull request as ready for review October 22, 2026 20:23
@brendanclement
brendanclement force-pushed the brendan/compose-versioned-site branch 2 times, most recently from 5d2a781 to 4fd461b Compare October 22, 2026 23:03
Base automatically changed from brendan/release-records-and-editions-r2 to main October 23, 2026 04:10
`scripts/compose.py`, run with `make compose`, publishes every saved
edition as saved under `/<product>/v<major>-<minor>-<patch>/`, with
Mintlify's own product and version selectors, and adds an "About this
version" page made from its record. Nothing is rebuilt, and an edition
that does not match its record is not composed.

`compose.yaml` orders the products, Enterprise first, and names each
product's preferred edition, which only that file changes. Links,
images and imports are pointed into their own edition; a link that
would leave it stops composition. Code is left as written, and a file
an example downloads stays at its address, the same for every edition.
Each edition keeps its redirects and drafts. Unversioned paths redirect,
temporarily, to the same page of the default edition, and paths it
lacks are listed rather than redirected.
README.md says how to compose, check and preview the site, how links,
downloads, site-wide files, redirects and drafts are handled, and where
the preferred editions are set. VERSIONING.md marks the step in place,
though nothing publishes its site yet.
Composition read pages and snippets line by line and guessed where code
ended, so some valid JavaScript strings were rewritten and other valid
forms were refused. It now parses each page and snippet with the parser
configuration Mint uses, pinned in scripts/mdx, and changes only the link
destinations the parser finds: Markdown links, images and definitions,
component link attributes, including those in exported components, and
imports. Strings, code and comments are left as written. A link attribute
that JavaScript calculates stops composition with the page and line.
@brendanclement
brendanclement force-pushed the brendan/compose-versioned-site branch from 4fd461b to a39f5b8 Compare October 23, 2026 16:19
@brendanclement
brendanclement merged commit 9fd0974 into main Oct 23, 2026
3 checks passed
@brendanclement
brendanclement deleted the brendan/compose-versioned-site branch October 23, 2026 16:22

- uses: actions/setup-node@v4
with:
node-version: 22

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: i think this setup-node version is outdated iirc

Comment thread scripts/compose.py
"---",
"",
f"These pages document {title}. They were saved from the sources below when this edition was "
"prepared, and later documentation changes reach them only as the corrections listed here.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"these pages document {title}."

this reads as if every page is that release. an edition also saves enterprise pages and pages from other commits, which is the contract we just wrote in #379. can this say these are the pages saved for the edition maybe? Fine without

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.

3 participants