Skip to content

Commit

Permalink
mermaid-js
Browse files Browse the repository at this point in the history
  • Loading branch information
Usioumeo committed Mar 8, 2024
1 parent 419317a commit 9a8c259
Show file tree
Hide file tree
Showing 6 changed files with 1,684 additions and 8 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,21 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- uses: actions/checkout@v4
- uses: jontze/action-mdbook@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
# Optional Plugins have to be enabled
use-linkcheck: true
use-mermaid: true
use-toc: true
use-opengh: true
use-admonish: true
use-katex: true
#- name: Setup mdBook
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: 'latest'

- run: mdbook build

Expand Down
12 changes: 11 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@ src = "src"
title = "lezioni-rust"

[build]
create-missing = false
create-missing = false

[preprocessor]

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

[output]

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

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
- [Torneo](./torneo_1.md)

# Altro
- [Git](./chapter_6_git.md)
- [Git](./chapter_6_git.md)
- [Cyberorto](./cyberorto.md)
7 changes: 7 additions & 0 deletions src/cyberorto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```

0 comments on commit 9a8c259

Please sign in to comment.