Thanks for helping improve myst-substitutions. This project is intentionally small, and changes should stay easy to read and review.
Repository layout¶
src/index.mjscore plugin logic (single file)dist/index.mjsbundled plugin used by docsdocs/MyST docs site for this repotest/Vitest testsJustfiletask runner commands for tests and docs.github/workflows/CI and release workflows
How the plugin works¶
The plugin is a MyST transform. It:
Loads substitutions from
myst.yml(project.substitutions).Loads page substitutions from frontmatter.
Uses Nunjucks to render
{{ var }}tokens.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:
Node.js for tests and dependencies.
Python +
uvfor docs/test helpers.justfor running repository commands.
Install dependencies:
npm installRun tests¶
just testBuild the bundle¶
just buildBuild docs¶
just docsLive docs¶
just docs-liveReleasing¶
Releases are handled by GitHub Actions. To make a release
Create a release in GitHub
A workflow will automatically run and attach the latest
dist/index.mjsto the release.