badboy / mdbook-mermaid

A preprocessor for mdbook to add mermaid support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong mdbook-mermaid configuration

Luni-4 opened this issue · comments

I'm using mdbook 0.4.6 and I have the following book.toml file:

[book]
title = "My title"

[output.html]
no-section-label = true
mathjax-support = true

When I run this command mdbook-mermaid install . for the first time I get:

[book]
title = "My title"

[output.html]
no-section-label = true
mathjax-support = true
[preprocessor]
[preprocessor.mermaid]
command = "mdbook-mermaid"

And the book isn't build correctly.
Only when I run the command above for the second time I get:

[book]
title = "My title"

[output.html]
no-section-label = true
mathjax-support = true
additional-js =["mermaid.min.js", "mermaid-init.js"]
[preprocessor]
[preprocessor.mermaid]
command = "mdbook-mermaid"

But the best outcome would be:

[book]
title = "My title"

[output.html]
no-section-label = true
mathjax-support = true
additional-js =["mermaid.min.js", "mermaid-init.js"]

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

Thanks in advance for your help! :)