docs: render repo Markdown as a Mintlify site with gated Pages deploy - #4094
Open
oxfern wants to merge 1 commit into
Open
docs: render repo Markdown as a Mintlify site with gated Pages deploy#4094oxfern wants to merge 1 commit into
oxfern wants to merge 1 commit into
Conversation
Adds a build script that assembles the Markdown already in this repo into a Mintlify site, plus a workflow that builds, validates and link-checks it on every docs change. Publishing is opt-in behind the DOCS_PAGES_DOMAIN repository variable. Pages currently serves the legal site from the `pages` branch as a legacy build, and Mintlify's export cannot be served from a subpath, so deploying without a custom domain would take privacy/terms offline and still render broken. Signed-off-by: lou <louai.misto@gmail.com>
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.
Opening this as a proposal rather than a finished call — CONTRIBUTING asks that new features get discussed first, so treat the deploy half as a question and the build half as the useful part regardless of the answer.
What this does
Renders the Markdown already in this repo as a browsable docs site. The Markdown stays the source of truth;
docs/site/build.pycopies the subset listed inPAGESinto a Mintlify tree, adds frontmatter and navigation, and nothing edits the source files.Right now the docs are repo-only.
block.github.io/buzz/serves terms/privacy/support, and the README doesn't link to it, so reading ARCHITECTURE.md or the NIPs means grepping raw Markdown on GitHub.What it looks like
Rendered from this repo's Markdown, unmodified:
45 pages: Architecture, Self-Hosting, Agents, all 15 NIPs, Vision, Project.
Why the deploy is opt-in
Two things make an unconditional deploy destructive, so publishing is gated behind a
DOCS_PAGES_DOMAINrepository variable.It would take the legal site offline. Pages currently serves
index/privacy/support/termsfrom thepagesbranch as alegacybuild. Usingactions/deploy-pagesswitches the source to GitHub Actions, and those pages stop resolving.Mintlify can't be served from
block.github.io/buzz/. The static export hardcodes root-absolute asset paths with nobasePathoption. I tried rewriting the paths to fit a subpath; the HTML still serves with a 200 and a correct<title>, but React fails to hydrate and every page rendersApplication error: a client-side exception has occurred. Worth knowing that HTTP-level checks pass while the site is entirely broken — only a real browser render catches it.So until a maintainer sets
DOCS_PAGES_DOMAINto a hostname pointed at Pages, every run builds, validates and link-checks without publishing. Merging this changes nothing user-visible.Workflow
Triggers on
pushtomainand on PRs touching*.md,docs/**, the three crate READMEs anddeploy/compose/README.md. It builds, runsmint validate, runsmint broken-links, and uploads the site as an artifact. The deploy job is skipped unless the variable is set.mint validateis load-bearing: a page routed to a name Mintlify reserves is dropped from the build and reported as "file does not exist" with no parse error.changelogandcontributingare both reserved, which is whyCHANGELOG.mdandCONTRIBUTING.mdroute toproject/release-notesandproject/contributing-guide.Adding a page
Add it to
PAGESinbuild.py. Group placement follows the route prefix, so a newarchitecture/…route joins that group with no other change.Open questions
docs.buzz.xyzwould work, and it leavesblock.github.io/buzz/serving the legal pages untouched.mint exportruns unauthenticated in the CLI, but Mintlify documents static export as an Enterprise API feature. Worth confirming it holds in CI before enabling the deploy.Verification
build.pywas run against this branch: 45 pages,mint validateandmint broken-linksboth clean. The screenshots are that build served from a domain root, rendered in a browser rather than checked by status code.