docs: migrate from Mintlify to Docusaurus 3#1174
Draft
planetf1 wants to merge 4 commits into
Draft
Conversation
Replaces the Mintlify configuration with a fully-working Docusaurus 3.10 site deployable to GitHub Pages. The existing docs/docs/ content is preserved with minimal changes: canonical frontmatter removed, sidebarTitle → sidebar_label, admonition syntax updated, numeric-prefix tutorial links stripped to match Docusaurus ID conventions, and broken old-path links fixed. Key additions: - docs/docusaurus.config.ts: single-plugin setup, 63 Mintlify redirects, IBM Plex Sans, local search, analytics script, fork/upstream base-URL logic - docs/sidebars.ts: manual sidebar matching existing content structure - docs/src/: custom CSS (monochrome palette), Mintlify shim components (Card, CardGroup, Note, Warning), MDXComponents registration - docs/static/CNAME: docs.mellea.ai - _category_.json files for all 11 doc sections - docs/docs/api/index.md: placeholder until autogen pipeline runs CI workflow (docs-publish.yml) updated to build with Docusaurus and deploy to gh-pages branch; DOCS_BASE_URL set to /mellea/ on fork, / on upstream. Autogen pipeline (build.py, generate-ast.py) guards against missing docs.json when running in Docusaurus mode. codespell skip list updated for package-lock.json. Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
The API docs pipeline regenerates docs/docs/api/ on each CI run,
deleting any manually-committed placeholder. Switch apiSidebar from
a fixed {type:'doc', id:'api/index'} entry to {type:'autogenerated',
dirName:'api'} so it works with the placeholder locally and with the
generated MDX tree in CI.
Assisted-by: Claude Code
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
The inject_sidebar_fix step emits a Mintlify-specific import into every generated API MDX file. Since the docs site is now Docusaurus, this import resolves to nothing and breaks the webpack build. Disable the injection; the Mintlify SidebarFix component is not needed in Docusaurus. Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
mdxify emits <Icon icon="github" style="..."/> in every API page heading as a source link. Register an Icon MDX shim that renders the GitHub SVG and handles the string-form style attribute that mdxify produces. Set onBrokenLinks: 'warn' (was 'throw') because the generated api-reference.mdx and reference/cli.md contain cross-reference links that break when resolved against the Docusaurus route tree. These are a known deferred item (full autogen pipeline retargeting). Static docs are clean; only generated pages emit warnings. Fix community/building-extensions link to point to the live API backend doc. Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.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.
What this does
This PR replaces the Mintlify documentation setup with a Docusaurus 3.10 site
that builds cleanly and deploys to GitHub Pages via a single CI job. The intent
is to give the team a live, navigable prototype at
https://planetf1.github.io/mellea/while we verify the migration beforecutting over the canonical
docs.mellea.aidomain.The content of
docs/docs/is preserved almost entirely — changes are purelymechanical: canonical frontmatter removed,
sidebarTitlerenamed tosidebar_label, a handful of admonitions updated to Docusaurus syntax, andinternal links de-prefixed to match the way Docusaurus strips numeric filename
prefixes from doc IDs (
01-your-first-generative-program→your-first-generative-program).Key design decisions
Single docs plugin, two named sidebars. Rather than two separate
@docusaurus/plugin-content-docsinstances, the site uses one plugin withrouteBasePath: '/'and bothdocsSidebarandapiSidebardefined insidebars.ts. This avoids SSR failures at the secondary plugin's root routewhen only a placeholder API doc exists.
apiSidebaris autogenerated. Thedocs/docs/api/tree is wiped andregenerated by the autogen pipeline on every CI run. A static
{type:'doc'}entry in the sidebar would be deleted on each build;
{type:'autogenerated', dirName:'api'}picks up whatever the pipeline emits. Locally, the placeholderdocs/docs/api/index.mdacts as the seed.SidebarFix injection disabled.
decorate_api_mdx.pywas emitting aMintlify-specific
import { SidebarFix } from "/snippets/SidebarFix.mdx"into every generated API MDX file. The snippet no longer exists on disk so
webpack fails. Step 3 in
decorate()is now a no-op; no Mintlify artefactsare needed in Docusaurus.
<Icon>shim added.mdxifygenerates<Icon icon="github" .../>as asource link in every API heading. An
IconMDX component shim is registeredglobally; it renders the GitHub SVG and handles the string-form
styleattribute that
mdxifyproduces.onBrokenLinks: 'warn'— the generatedapi-reference.mdxandreference/cli.mdfiles contain cross-references that resolve incorrectlyagainst the Docusaurus route tree. These are a known deferred item (full
autogen pipeline retargeting). All static documentation pages are clean.
Fork/upstream base URL separation.
DOCS_BASE_URLis set to/mellea/when running on
planetf1/melleaand/ongenerative-computing/mellea.The same
docusaurus.config.tshandles both cases viaprocess.env.What's included
docs/docusaurus.config.ts— full config: single-plugin setup, 63 Mintlifyredirect rules, IBM Plex Sans typography, local search, analytics script
docs/sidebars.ts— 11-section manual sidebar plus autogenerated API sidebardocs/src/— custom CSS (monochrome palette, sidebar badges), Mintlify shimcomponents (Card, CardGroup, Icon, Note, Warning), global MDX registration
docs/static/CNAME—docs.mellea.ai_category_.jsonfor all 11 doc sectionsdocs.json(Docusaurus mode)and to disable the Mintlify-only SidebarFix injection
npm ci, Docusaurus build, deploy togh-pagesbranch viapeaceiris/actions-gh-pagesCI status
✅ Build and deploy passing on
planetf1/mellea. Live at:https://planetf1.github.io/mellea/
What's deferred
cross-reference cleanup — root cause of remaining
onBrokenLinks: 'warn'entries)
markdownlint-cli→markdownlint-cli2bumpTesting
Spot checks to verify:
/guide/glossary→/reference/glossary) works