Guidelines for writing and maintaining documentation in this repository.
All files use GitHub-flavored Markdown.
- Every markdown file must start with an h1 header (
# Title). - Every folder must contain a
README.md. - Numbered prefixes are mandatory for folders and all markdown files except
README.md(e.g.1-for-liquidity-providers/,2-reward-mechanism-sticnt.md). - Use kebab-case for all file and folder names.
Use standard markdown image syntax: 
| Type | Format | Example |
|---|---|---|
| External image | Full URL |  |
| Local image | Filename only (file lives in public/docs/img/) |
 |
When working with images:
- Prefer
.webpformat - When adding: place the file in the correct app's
public/docs/img/and reference it by bare filename in markdown - When removing: remove both the file and all markdown references
- When renaming: update all markdown references across all locale folders (e.g.
en/,zh/)
Run pnpm check:images to verify all images are consistent. The script checks every app for:
- Missing images: referenced in markdown but the file doesn't exist in
public/docs/img/ - Orphaned images: file exists in
public/docs/img/but no markdown references it
This check also runs automatically on PRs to main via GitHub Actions and will block merge on failure. Always run it locally before pushing image-related changes.
Use standard markdown link syntax: [text](url)
| Type | Format | Example |
|---|---|---|
| Asset link | Filename only (asset lives in public/docs/file/) |
[audit](audit.pdf) |
| External link | Full URL | [GLIF](https://www.glif.io) |
| Internal link | / + URL slug path to file or folder |
[rewards](/tokens/rewards) |
| Anchor link | # + anchor name (same page only) |
[see below](#example-section) |
| Internal + anchor | Internal path + # + anchor name (other page) |
[staking](/tokens/rewards#staking) |
Important
To link to a heading on the same page, use a plain anchor link (#anchor-name). To link to a heading on a different page, use the internal + anchor format (/path#anchor-name).
Tip
To find the correct slug or anchor name, create the file/folder or heading first, then check the generated URL or anchor in the browser.
LaTeX math expressions are supported via KaTeX. Only display (block) math using $$ is enabled. Inline math ($...$) is disabled to prevent conflicts with dollar sign currency notation (e.g. $GLF).
$$
\sum_{i=1}^{n} x_i = x_1 + x_2 + \cdots + x_n
$$See the KaTeX supported functions for a full reference.
GitHub-style blockquote alerts are supported. Start a blockquote with [!TYPE] on the first line:
> [!NOTE]
> Useful background information.
> [!TIP]
> Helpful advice for best results.
> [!IMPORTANT]
> Key information the reader should know.
> [!WARNING]
> Something that could cause problems.
> [!CAUTION]
> Risk of data loss or other serious consequences.