add mdbook-mermaid
This commit is contained in:
parent
061577567f
commit
f3cac7c8fc
|
|
@ -16,6 +16,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
MDBOOK_VERSION: 0.4.12
|
MDBOOK_VERSION: 0.4.12
|
||||||
MDBOOK_LINKCHECK_VERSION: 0.7.2
|
MDBOOK_LINKCHECK_VERSION: 0.7.2
|
||||||
|
MDBOOK_MERMAID_VERSION: 0.10.0
|
||||||
MDBOOK_TOC_VERSION: 0.6.1
|
MDBOOK_TOC_VERSION: 0.6.1
|
||||||
DEPLOY_DIR: book/html
|
DEPLOY_DIR: book/html
|
||||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||||
|
|
@ -31,7 +32,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin
|
~/.cargo/bin
|
||||||
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}
|
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }}
|
||||||
|
|
||||||
- name: Cache linkcheck
|
- name: Cache linkcheck
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
|
|
@ -59,6 +60,7 @@ jobs:
|
||||||
cargo install mdbook --version ${{ env.MDBOOK_VERSION }}
|
cargo install mdbook --version ${{ env.MDBOOK_VERSION }}
|
||||||
cargo install mdbook-linkcheck --version ${{ env.MDBOOK_LINKCHECK_VERSION }}
|
cargo install mdbook-linkcheck --version ${{ env.MDBOOK_LINKCHECK_VERSION }}
|
||||||
cargo install mdbook-toc --version ${{ env.MDBOOK_TOC_VERSION }}
|
cargo install mdbook-toc --version ${{ env.MDBOOK_TOC_VERSION }}
|
||||||
|
cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}
|
||||||
|
|
||||||
- name: Check build
|
- name: Check build
|
||||||
run: mdbook build
|
run: mdbook build
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,13 @@ create-missing = false
|
||||||
command = "mdbook-toc"
|
command = "mdbook-toc"
|
||||||
renderer = ["html"]
|
renderer = ["html"]
|
||||||
|
|
||||||
|
[preprocessor.mermaid]
|
||||||
|
command = "mdbook-mermaid"
|
||||||
|
|
||||||
[output.html]
|
[output.html]
|
||||||
git-repository-url = "https://github.com/rust-lang/rustc-dev-guide"
|
git-repository-url = "https://github.com/rust-lang/rustc-dev-guide"
|
||||||
edit-url-template = "https://github.com/rust-lang/rustc-dev-guide/tree/master/{path}?mode=edit"
|
edit-url-template = "https://github.com/rust-lang/rustc-dev-guide/tree/master/{path}?mode=edit"
|
||||||
|
additional-js = ["mermaid.min.js", "mermaid-init.js"]
|
||||||
|
|
||||||
[output.html.fold]
|
[output.html.fold]
|
||||||
enable = true
|
enable = true
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
mermaid.initialize({startOnLoad:true});
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue