fix(docs): enable mermaid diagrams via pymdownx.superfences custom_fences#20
Merged
Conversation
docs/livestreams.md already contains a flowchart-LR mermaid block, but it rendered as a literal code block because the SuperFences custom-fences handler wasn't configured. Material for MkDocs bundles Mermaid.js automatically when the fence is declared this way -- no extra plugin or runtime dependency. Verified by building locally with `uv run mkdocs build --strict`: the livestreams page now emits `<pre class="mermaid">` which the Material runtime upgrades into an interactive diagram. Versions confirmed against the latest releases on PyPI via context7 + the squidfunk reference docs: - mkdocs 1.6.x (current floor `>=1.6` accepts 1.6.1) - mkdocs-material 9.7.x (current floor `>=9.5` accepts 9.7.6) - pymdown-extensions 10.21.x (current floor `>=10.7` accepts; the fence_code_format format has been stable since 9.x) No pyproject.toml changes needed; the existing docs deps are already loose enough to pull the latest minors. See https://squidfunk.github.io/mkdocs-material/reference/diagrams/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`docs/livestreams.md` already had a flowchart-LR mermaid block but rendered it as a literal code block because the SuperFences custom-fence handler wasn't configured.
Material for MkDocs bundles Mermaid.js automatically when the fence is declared this way; no extra plugin or runtime dependency (reference).
```yaml
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
```
Verified locally with `uv run mkdocs build --strict`: the livestreams page now emits `