Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Contributing

Thanks for helping improve myst-substitutions. This project is intentionally small, and changes should stay easy to read and review.

Repository layout

How the plugin works

The plugin is a MyST transform. It:

  1. Loads substitutions from myst.yml (project.substitutions).

  2. Loads page substitutions from frontmatter.

  3. Uses Nunjucks to render {{ var }} tokens.

  4. Parses substituted text as MyST inline content so markup like **bold** becomes AST nodes.

All core logic lives in src/index.mjs.

Development setup

Requirements:

Install dependencies:

npm install

Run tests

just test

Build the bundle

just build

Build docs

just docs

Live docs

just docs-live

Releasing

Releases are handled by GitHub Actions. To make a release