-
Notifications
You must be signed in to change notification settings - Fork 131
Diagrams are not rendering on pkgdown site #1497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@maelle: How can we make Mermaid work in pkgdown? |
Related question: @krlmlr does this diagram work for you when you knit the vignette? It does not for me. |
Interestingly DiagrammeR has a pkgdown website http://visualizers.co/diagrammer/ but no mermaid diagram sadly. |
After experimenting a bit I discovered what works is using the Markdown of the diagram directly, I mean: ```{r echo = FALSE}
DiagrammeR::mermaid("graph TD
Import --> Tidy
Tidy --> Transform
Transform --> Visualize
Visualize --> Communicate
Visualize --> Model
Model -.-> Transform
")
```
I'm a bit surprised. I'm not sure whether this is pkgdown or DiagrammeR's doing however note I observe the same behavior (using the filename: the Markdown is printed in the doc; using the Markdown: the diagram appears) when knitting. |
This works too: ```{r echo = FALSE}
text <- paste(
readLines("r4ds.mmd"),
collapse = "\n"
)
DiagrammeR::mermaid(text)
```
@krlmlr do you want me to make a PR with this "quick fix" or to investigate further/report to DiagrammeR? |
Thanks. A quick fix is fine, we can even use something like
|
Mermaid diagrams are not properly rendering on the pkgdown site.

Here is a screencap from https://tibble.tidyverse.org/articles/formats.html
The text was updated successfully, but these errors were encountered: