Skip to content

Repository files navigation

moddef.org

The ModDef documentation site. Docusaurus renders the hand-written guide, spec, measurand catalog, and CLI reference, with each language's API reference generated by its own native tool and served same-origin under /sdk/<lang>/.

Structure

Path Source
/ React landing page (src/pages/index.tsx)
/guide/* hand-written MDX (docs/guide/)
/spec/* rendered from moddef/spec (synced)
/stdlib/measurands generated from moddef/stdlib YAML (synced)
/cli/* generated from the moddef CLI --help (synced)
/sdk/ SDK overview (docs/sdk/index.mdx)
/sdk/go redirect to pkg.go.dev
/sdk/typescript TypeDoc
/sdk/rust rustdoc
/sdk/python Sphinx
/sdk/c Doxygen
/sdk/cpp Doxygen

The insight: don't force one generator to document six languages. Each SDK's docs come from the tool its community expects (rustdoc, TypeDoc, Sphinx, Doxygen), dropped into static/sdk/<lang>/ and linked with pathname:// so they navigate as real pages, not iframes.

Local development

Needs sibling checkouts of moddef (spec/CLI/stdlib) and, for the API docs, the SDK repos, one directory up:

ModDefOrg/
  moddef.org/   ← here
  moddef/  moddef-ts/  moddef-rs/  moddef-py/  moddef-c/
npm install
npm run sync     # render spec, measurands, CLI from ../moddef
npm start        # dev server (also runs sync)
npm run build    # production build (prebuild runs sync)

bash scripts/build-sdk-docs.sh   # optional: real API docs into static/sdk/*

Without build-sdk-docs.sh, the committed static/sdk/<lang>/index.html placeholders are served. Synced content (docs/spec/v0.4.md, docs/stdlib/measurands.mdx, docs/cli/reference.mdx) is gitignored and regenerated.

Deployment

.github/workflows/deploy.yml checks out all sibling repos, builds every SDK's API docs, syncs content, builds the site, and deploys to GitHub Pages (moddef.org, via static/CNAME). This is the coupled build: per-SDK doc-tool config lives in scripts/build-sdk-docs.sh for now; it can later move into each SDK repo's CI, publishing artifacts this site pulls at build time.

Credits

The ModDef logo incorporates the "Files Stack" icon by Jadid Ahmed from the Noun Project, used under the Creative Commons Attribution 3.0 (CC BY 3.0) license.

License

Apache-2.0. See LICENSE, NOTICE, and CONTRIBUTING.md. The synced spec content is CC-BY-4.0 and the synced measurand and other stdlib data is CC0-1.0, under their upstream licenses in the moddef repository.

About

Main ModDef landing and documentation site

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages