feat: add mermaid diagram rendering with interactive zoom overlay to mdbook docs#140
Open
sahitya-chandra wants to merge 2 commits intobenodiwal:mainfrom
Open
feat: add mermaid diagram rendering with interactive zoom overlay to mdbook docs#140sahitya-chandra wants to merge 2 commits intobenodiwal:mainfrom
sahitya-chandra wants to merge 2 commits intobenodiwal:mainfrom
Conversation
- Updated book.toml to include new CSS and JS files for mermaid zoom feature. - Added mermaid-zoom.css for styling the zoom overlay and controls. - Implemented mermaid-zoom.js to handle zooming and panning interactions for mermaid diagrams.
Contributor
Author
|
@benodiwal sir, can you please review this PR when you get a chance? I left this in my #90 pr, but now I thought adding this would make it easy for someone who wants to understand the architecture Let me know if you'd like any changes! |
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
mdbook-mermaidpreprocessor to render mermaid diagrams in the documentationarchitecture.mddisplayed raw code instead of rendered diagramscopy-fontsoption frombook.tomlBefore
Screencast.from.2026-04-02.12-34-30.webm
After
Screencast.from.2026-04-02.12-42-42.webm
Files Added
mermaid.min.js: Mermaid library for rendering diagrams (generated bymdbook-mermaid install)mermaid-init.js: Initialization script for mermaid (generated bymdbook-mermaid install)mermaid-zoom.js: Custom interactive overlay with drag-to-pan, scroll/pinch zoom, and keyboard supportmermaid-zoom.css: Styles for the zoom overlay, adapted to mdbook theme variables