Repository navigation
feat: compose saved editions into one versioned site - #381
Merged
Merged
Conversation
brendanclement
force-pushed
the
brendan/compose-versioned-site
branch
from
October 22, 2026 20:11
570b2ae to
69c403b
Compare
brendanclement
marked this pull request as ready for review
October 22, 2026 20:23
brendanclement
force-pushed
the
brendan/compose-versioned-site
branch
2 times, most recently
from
October 22, 2026 23:03
5d2a781 to
4fd461b
Compare
Base automatically changed from
brendan/release-records-and-editions-r2
to
main
October 23, 2026 04:10
rpgreen
approved these changes
Oct 23, 2026
`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
force-pushed
the
brendan/compose-versioned-site
branch
from
October 23, 2026 16:19
4fd461b to
a39f5b8
Compare
geruh
reviewed
Oct 23, 2026
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 |
Member
There was a problem hiding this comment.
nit: i think this setup-node version is outdated iirc
| "---", | ||
| "", | ||
| 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.", |
Member
There was a problem hiding this comment.
"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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 composeto 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.yamlchooses 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