fix: render mermaid diagrams instead of raw code blocks - #33
Merged
Conversation
docs/architecture.md and its Chinese translation contain 8 ```mermaid fenced blocks, but @docusaurus/theme-mermaid was never installed and markdown.mermaid was never enabled. Docusaurus fell back to treating the blocks as plain code, so the architecture diagrams shipped to the site as raw mermaid source text. Install the theme, enable markdown.mermaid, and map the diagram theme to the site colour mode so diagrams do not stay light on a dark page. Verified in the browser: all 4 diagrams on /docs/architecture render as SVG in both colour modes, and neither locale's build output contains a language-mermaid block any more. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5 tasks
5 tasks
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/architecture.mdand its Chinese translation contain 8 ```mermaid fenced blocks, but@docusaurus/theme-mermaidwas never installed and `markdown.mermaid` was never enabled. Docusaurus fell back to treating them as plain code, so the architecture diagrams added in #31/#32 currently ship to the site as raw mermaid source text.Changes
@docusaurus/theme-mermaid@3.10.1(pinned, matching the other@docusaurus/*deps)markdown.mermaidand register the theme indocusaurus.config.ts{light: 'neutral', dark: 'dark'}) so diagrams do not stay light on a dark pageTesting
npm run buildpasses (both locales)npx tsc --noEmitpasses/docs/architecturerender as SVGrgb(31,32,32), labelrgb(227,227,227)rgb(238,238,238), labelrgb(51,51,51)language-mermaidblock any more (was 8, now 0)Note
package-lock.jsongrows a lot because mermaid pulls in d3/cytoscape/dagre. 27 of the deleted lines are incidental"peer": truemarkers from an npm version difference, not a dependency change.🤖 Generated with Claude Code