This file is for contributors and coding agents working in this repository.
It captures how documentation is organized, written, and maintained in nillion-docs.
- Framework: Docusaurus v3
- Docs root:
docs/ - Blog root:
blog/ - Static assets:
static/(especiallystatic/img/) - Sidebar config:
sidebars.jssidebar-learn.jssidebar-build.jssidebar-community.jssidebar-blacklight.js
- Write for builders first: practical, task-oriented, and implementation-focused.
- Prefer clear build flows over conceptual prose:
- prerequisites
- step-by-step instructions
- runnable commands/code
- troubleshooting/next steps
- Explicitly recommend preferred paths when relevant (for example, UI/recommended workflow vs low-level alternatives).
- Use Nillion product language consistently:
- Blind Computer
- Blacklight
- Private Storage (nilDB)
- Private LLMs (nilAI)
- Private Compute / Confidential Compute (nilCC)
- Use
.mdfor mostly markdown pages. - Use
.mdxwhen using React/Docusaurus components or custom JSX layouts. - Note: this repo already uses MDX features in both
.mdand.mdxfiles (imports/components at top are common).
- Most hand-authored docs pages rely on
# H1and often omit frontmatter. - Use frontmatter when needed (for example custom
title,description,sidebar_label, or blog metadata). - Blog posts should use frontmatter with fields like:
titledescriptionslugauthorstagsimage
Common structure used in quickstarts and guides:
- Intro / what the guide does
- Prerequisites
- Numbered steps
- Verification or expected output
- Next steps / related docs
Common section names in this repo include:
What You'll BuildWhat You'll LearnPrerequisitesProject SetupNext Steps
- Use root-relative internal links (example:
/blind-computer/build/storage/overview). - Use explicit external links for tools, repos, and portals.
- Keep links actionable and specific (direct users to exact guide/section when possible).
- Always set a language for fenced code blocks when possible (
bash,typescript,python,yaml, etc.). - Use
reference showGithubLinkblocks when pointing to canonical source examples in external repos. - Keep commands copy-paste friendly.
Commonly used components:
- Docusaurus:
TabsTabItem
- Local components:
CTABannerThumbsUpDownFeatureSectionToolFeatureItemAddNetworkButton(MetaMask network add UX)IframeVideo
If reusing a component, check its props in:
src/components/CTABanner/index.jssrc/components/ThumbsUpDown/index.jssrc/components/ToolFeatureItem/index.jssrc/components/MetamaskConnect/index.jssrc/components/IframeVideo/index.js
Use Docusaurus admonitions for guidance and guardrails:
:::tip:::info:::note:::warning
Prefer concise callouts that directly unblock the user.
- Store assets in
static/img/. - Reference images with site-relative paths like
/img/<file>. - Use descriptive alt text.
- This repo sometimes uses inline HTML/JSX layout (
<div>,<img>,<iframe>) for side-by-side walkthrough sections.
- New docs do not automatically appear in navigation; update relevant sidebar file.
- Choose the sidebar file by section:
- Blacklight docs ->
sidebar-blacklight.js - Blind Computer Learn/Build/Tools ->
sidebar-learn.jsorsidebar-build.js - Community ->
sidebar-community.js
- Blacklight docs ->
sidebars.jscomposes all section sidebars.
Use:
yarn startand for verification:
yarn builddocusaurus.config.js is strict on broken links (onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'throw'), so link integrity must be maintained.
- Keep explanations concrete and implementation-oriented.
- Prefer short paragraphs and scannable lists.
- Avoid unnecessary jargon when a direct instruction is possible.
- If describing a sequence, use numbered steps.
- If a flow has options (e.g., UI vs API, Python vs TypeScript), use tabs.
Checklist:
- Update the target doc page(s).
- Update relevant sidebar file if navigation should change.
- Verify internal links and anchors.
- Ensure commands/code snippets are runnable and current.
- Run
yarn buildbefore finalizing substantial changes.