Skip to content

fix: render Mermaid diagrams and tidy pages after the move - #1

Merged
Itx-Psycho0 merged 3 commits into
mainfrom
fix/render-mermaid-diagrams
Dec 3, 2026
Merged

Itx-Psycho0 merged 3 commits into
mainfrom
fix/render-mermaid-diagrams

Conversation

@Itx-Psycho0

@Itx-Psycho0 Itx-Psycho0 commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

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.js loads 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.css centres the diagrams; book.toml registers the script.

2. Notes on the two pages that described the old layout. project/repository-structure.md and project/readme-specification.md are the original plans, which put the docs in Docs/ 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 build runs without errors
  • Tested on a local build: all 4 diagrams on the low-level design page render, 0 errors, light and dark themes
  • No new pages (SUMMARY.md unchanged)
  • Links between pages are relative

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.
@Itx-Psycho0 Itx-Psycho0 changed the title fix: render Mermaid diagrams on the site fix: render Mermaid diagrams and tidy pages after the move Dec 3, 2026
@Itx-Psycho0
Itx-Psycho0 merged commit 8dc19e8 into main Dec 3, 2026
2 checks passed
@Itx-Psycho0
Itx-Psycho0 deleted the fix/render-mermaid-diagrams branch December 3, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant