This directory is the Mintlify site for docs.opengeometry.io. Keep
docs.json at this directory's root.
Every page lives in opengeometry/, because Mintlify builds a page's address from its file path:
opengeometry/quickstart.mdx is /opengeometry/quickstart. docs.json, style.css, the logo,
the favicon, api-coverage.json and llms.txt stay at the top. The redirects in docs.json send
the addresses of the 2.0 site to their new pages.
Use Node.js 22 or later.
cd docs
npm ci
npm run devMintlify prints the local preview address. Preview and strict validation download Mintlify's client on the first run, so an internet connection is required.
Before you submit a change:
npm run format
npm run index
npm run checknpm run check checks formatting, that api-coverage.json and llms.txt are current, strict
Mintlify validation, and internal links with heading anchors. Run
npm run links -- --check-external when you change external links.
Every ts block in a page is type-checked against the built package by
main/scripts/build/readme-code.test.mjs, together with the README and MIGRATION.md. It runs in the
repository gate (npm run check at the root), because it needs main/dist. Write each block as a
complete module: its imports, await OpenGeometry.create(...), then the code. Use bash, js,
json or text for blocks that must not be compiled.
scripts/build-index.mjs reads the exports of main/opengeometry-three/index.ts and checks that
each one is named on its API page. It writes api-coverage.json and llms.txt. When you add an
export, name it on an API page and add it to PAGES in the script if the default does not fit:
OG_* constants and parameter types go to the Constants page.
- Add MDX pages under
opengeometry/withtitleanddescriptionfrontmatter and kebab-case paths. Link between pages with the full address, such as/opengeometry/quickstart. - Add each page to its navigation group in
docs.json, then runnpm run index. style.cssdraws the tree lines of the Documentation tab. Its selector uses the Changelog route; update it if that route changes.- Write in short sentences, one idea each, in the active voice. Define a term before you use it. Say what the reader sees and what to do.
- Describe only what the package does. Do not document 2.0 calls except on the migration page.