Repository navigation
fix: render Mermaid diagrams and tidy pages after the move - #1
Merged
Merged
Conversation
The high- and low-level design pages contain five ```mermaid blocks. GitHub draws them, but mdBook printed them as plain code. theme/mermaid-init.js loads Mermaid 11.4.1 from jsDelivr only on pages that have a diagram, turns each block into a diagram and picks Mermaid's dark theme when a dark mdBook theme (navy, coal, ayu) is active. The CSS centres the diagrams and drops the code-block background.
The repository structure and README specification pages are the original plans, written when documentation lived in Docs/ inside the code repository. Each page now opens with a note that says so. The repository structure note shows how the organisation is laid out today: code in PsyDian_OS, this book in PsyDianOS/docs. It links the code README for the current source layout. The old plan below the note is kept as written.
Most existing pages use Title Case headings (about 700 of them). Asking every pull request to follow sentence case would mix formatting into content changes, so the rule now applies to new pages and full rewrites. The pull request checklist says the same.
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.
What changes
1. Mermaid diagrams render on the site. The high-level and low-level design pages contain five Mermaid diagrams (one flowchart, four sequence diagrams). GitHub draws them, but mdBook showed them as raw text.
theme/mermaid-init.jsloads Mermaid 11.4.1 from jsDelivr only on pages with a diagram, renders each block, and uses Mermaid's dark theme when a dark mdBook theme is active. If the CDN is blocked, the diagram falls back to its code.theme/psydian.csscentres the diagrams;book.tomlregisters the script.2. Notes on the two pages that described the old layout.
project/repository-structure.mdandproject/readme-specification.mdare the original plans, which put the docs inDocs/inside the code repository. Each now opens with a note. The repository structure note also has a table of the organisation as it is today (PsyDian_OS for code, this repository for the book). The original text below is unchanged.3. Heading style rule applies to new pages. CONTRIBUTING asked for sentence-case headings, but about 700 existing headings use Title Case. The rule (and the PR checklist) now covers new pages and full rewrites, so content PRs don't fill up with formatting changes.
Why
These came out of reviewing the move from
PsyDian_OS/Docs(PsyDianOS/PsyDian_OS#27).Checklist
mdbook buildruns without errors