Identus documentation site built with Docusaurus 3. Yarn-based monorepo that aggregates content from local files and two git submodules.
yarn install # Install deps; postinstall hook runs prepare.sh automatically
yarn start # Dev server (also runs prepare.sh before starting)
yarn build # Production build (prepare.sh → Docusaurus SSG → static site in build/)
yarn clear # Clear Docusaurus cache (.docusaurus/)
yarn serve # Serve the production build locallyprepare.sh runs docusaurus clean-api-docs all && docusaurus gen-api-docs all — it is invoked automatically by yarn install (postinstall) and by yarn start/yarn build. You do not need to run it manually.
All documentation content flows into a single Docusaurus instance via three source paths configured in src/config/constants.ts:
| Source path | Contents | Origin |
|---|---|---|
documentation/ |
Learn, develop, reference sections | Local (committed in this repo) |
cloud-agent/docs/docusaurus/ |
Cloud Agent guides and OpenAPI spec | cloud-agent/ git submodule |
sdk-ts/docs/ |
TypeScript SDK docs (TypeDoc-generated) | sdk-ts/ git submodule |
Three sidebars (sidebars.ts) map to three top-level nav items:
- Learn →
learnSidebar(discoverslearn/across all content sources) - Developers →
developersSidebar(discoversdevelop/) - Reference →
referenceSidebar(discoversreference/)
Sidebar items are resolved at build time by src/utils/discovery.ts — it scans each content source for sidebar.ts files or _category_.json files and falls back to auto-generated items sorted by sidebar_position frontmatter.
documentation/reference/Cloud Agent API/— Generated bydocusaurus-plugin-openapi-docsfromcloud-agent/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml. Regenerated byprepare.sh. Any manual edits here are overwritten on the next build.- SDK TypeDoc pages (
sdk-ts/docs/sdk/) — Pre-generated by TypeDoc in thesdk-tssubmodule and committed there; consumed read-only by this repo. (docusaurus-plugin-typedocis a devDependency but is not configured in the Docusaurus build pipeline.) A customparseFrontMatterhook indocusaurus.config.tsextracts titles from these pages so they render correctly in sidebars. Do not hand-edit these files — regenerate them in thesdk-tssubmodule instead.
cloud-agent/ and sdk-ts/ are git submodules providing their documentation and OpenAPI specs:
git submodule init
git submodule update --remote --recursiveCI updates submodules weekly via .github/workflows/update-submodules.yml. When working with submodule content, ensure the submodule is checked out at the correct commit.
sidebars.ts— Entry point; callsdiscoverSidebar()for each sectionsrc/utils/discovery.ts— Scans content paths, loads per-directorysidebar.tsor_category_.json, falls back to auto-generationsrc/config/presets.ts— Multi-doc preset wiring; configures the docs plugin with include globs, the OpenAPI plugin, andremarkLinkFixersrc/plugins/remarkLinkFixer.js— Rewrites legacy markdown links (e.g., old/home/paths) to current URLs; rules configured inpresets.tssrc/config/headerMenu.ts— Top navbar items_category_.jsonin content dirs — Sets label, position, collapsibility for sidebar categories
redocly.yaml configures Redocly OpenAPI rendering (theme colors, sidebar, code blocks). This controls how the Cloud Agent API reference looks inside the Docusaurus site. The underlying spec file is cloud-agent/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml.
yarn build produces a static site in build/ that is deployed to https://hyperledger-identus.github.io/docs/ via release-gh-pages.yml. The site is a static SSG — no server-side rendering.
- Mega-linter — Runs on all PRs (
.github/workflows/mega-linter.yml); applies auto-fixes and creates fix PRs - Linkinator — Checks broken links on push to main and weekly on Mondays (
.github/workflows/link-check.yml); config in.linkinatorrc.json - GitHub Pages deploy —
release-gh-pages.ymlbuilds and deploys on push to main; usespeaceiris/actions-gh-pageswithIDENTUS_CItoken
| File | Purpose |
|---|---|
docusaurus.config.ts |
Docusaurus core config: site metadata, markdown settings, front matter hooks, plugins |
src/config/presets.ts |
Multi-doc preset: content sources, OpenAPI plugin config, remark link fixer rules |
src/config/constants.ts |
Content path constants (documentation/, cloud-agent/docs/docusaurus/, sdk-ts/docs/) |
src/config/headerMenu.ts |
Navbar sidebar associations |
src/utils/discovery.ts |
Auto-discovers sidebar items from content directories |
sidebars.ts |
Sidebar wiring using discoverSidebar() |
redocly.yaml |
Redocly OpenAPI rendering theme |
prepare.sh |
Pre-build: cleans and regenerates API docs |
package.json |
Scripts, deps, Yarn 4 config |