Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Documentation website

This book is built with mdBook from the Markdown files in docs/ and published to https://m-compressors.github.io/ngx_mzstd/ by GitHub Pages. Edit those files directly; docs/SUMMARY.md sets the order of the sidebar.

Build locally

cargo install mdbook --version 0.5.4 --locked
mdbook build
python3 scripts/check-book-links.py

The book is written to target/book/. To preview it while editing:

mdbook serve --open

scripts/check-book-links.py checks that every local link and every #anchor in the rendered book points to a page and heading that exist. It needs only Python 3 and does not fetch external links.

Writing a page

  • A new page must be listed in docs/SUMMARY.md; the build does not create missing files.
  • A new or changed directive goes in Directives, in the same form as the existing ones (syntax, default, context, behaviour), and in the table at the top of that page. A new extension also goes in Migrating.
  • Link to a directive as directives.md#zstd_window: mdBook makes each heading’s text its anchor.
  • Link to files outside docs/ by their URL on GitHub, since only docs/ is published.

Theme

book-theme/custom.css extends mdBook’s built-in light and navy themes with the palette of the mzstd and mbrotli books, and styles tables, the directive summaries and the landing page (docs/introduction.md). It is plain CSS with no build step.

Publishing

In the repository settings, select Pages → Build and deployment → Source → GitHub Actions once. .github/workflows/pages.yml then:

  1. builds the book and checks its links on pull requests and pushes to main that touch the documentation;
  2. deploys it only on pushes to main or a manual run on main.

Pull requests are validated without publishing and without Pages write permissions. There is no generated-content branch.