Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 3.26 KB

File metadata and controls

89 lines (60 loc) · 3.26 KB

Contributing

Guidelines for writing and maintaining documentation in this repository.

Markdown syntax

All files use GitHub-flavored Markdown.

File structure rules

  1. Every markdown file must start with an h1 header (# Title).
  2. Every folder must contain a README.md.
  3. Numbered prefixes are mandatory for folders and all markdown files except README.md (e.g. 1-for-liquidity-providers/, 2-reward-mechanism-sticnt.md).
  4. Use kebab-case for all file and folder names.

Images

Use standard markdown image syntax: ![alt text](url)

Type Format Example
External image Full URL ![diagram](https://example.com/diagram.png)
Local image Filename only (file lives in public/docs/img/) ![GLIF Logo](logo.webp)

When working with images:

  • Prefer .webp format
  • 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/)

Image integrity check

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.

Links

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.

Math expressions

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.

Blockquote alerts

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.