Skip to content

Commit

Permalink
✨ Add mermaid-js plugin to book
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Nov 24, 2023
1 parent 23d6a5d commit a9b3444
Show file tree
Hide file tree
Showing 4 changed files with 1,295 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup mdBook
- name: Setup mdbook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.10'
# mdbook-version: 'latest'
mdbook-version: 'latest'
- name: Setup mdbook-mermaid
uses: magicgh/mdbook-mermaid-action@v1
with:
version: 'latest'
- name: Build book
working-directory: ./book
run: mdbook build
Expand Down
6 changes: 6 additions & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ language = "en"
multilingual = false
src = "src"
title = "The Kona Book"

[preprocessor.mermaid]
command = "mdbook-mermaid"

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
1 change: 1 addition & 0 deletions book/mermaid-init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mermaid.initialize({ startOnLoad: true, theme: 'dark' });
1,282 changes: 1,282 additions & 0 deletions book/mermaid.min.js

Large diffs are not rendered by default.

0 comments on commit a9b3444

Please sign in to comment.