Quick Start

Build a site

bash
1
2
3
git clone https://github.com/celestia-island/lagrange
cd lagrange
cargo run --release -- build --src docs --out target/site

Open target/site/index.html — it redirects to the English book.

Live hikari components

Code blocks tagged hikari are compiled and rendered at build time. The resulting HTML is shown in a preview pane with a toggle to view the source.

(live preview unavailable)

Directory layout

text
1
2
3
4
5
6
7
8
9
docs/
├── logo.webp            # shared assets live at the docs root
├── en/
│   ├── README.md        # -> ../../README.md (the repo landing page)
│   ├── SUMMARY.md       # drives the sidebar
│   └── guides/*.md
├── zh-Hans/
│   ├── README.md        # one translated landing page per language
│   └── ...

Each subdirectory of docs/ is one language. SUMMARY.md drives the sidebar. README.md and index.md both map to index.html; symlinking docs/en/README.md to the root README.md keeps GitHub and the docs site in sync.

Markdown support

Headings, paragraphs, fenced code, lists, blockquotes, tables, thematic breaks, images, inline code, bold, italic, links, and raw HTML blocks (so a centred <p align="center">…</p> in a README passes through untouched).

Blockquotes are supported too.

Deploying

The build emits a static directory — see the root README for GitHub Pages, Cloudflare Pages and Vercel recipes.

Theme-conditional images

Screenshots that must differ between light and dark pages carry the ecosystem's URL-fragment convention — GitHub's #gh-light-mode-only / #gh-dark-mode-only, or the mkdocs-material aliases #only-light / #only-dark:

markdown
1
2
![Dashboard in light mode]dashboard.webp#gh-light-mode-only
![Dashboard in dark mode]dashboard.dark.webp#gh-dark-mode-only

The fragment is stripped from the emitted src, and the page hides the variant that does not match the reader's prefers-color-scheme. An image without a fragment belongs to both schemes, so a plain screenshot only needs the default (light) file. The same markdown renders correctly on GitHub, which understands the gh-* spelling.