Skip to content
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

allow rendering included files #31

Closed
flokli opened this issue Apr 27, 2022 · 5 comments · Fixed by #33
Closed

allow rendering included files #31

flokli opened this issue Apr 27, 2022 · 5 comments · Fixed by #33

Comments

@flokli
Copy link
Contributor

flokli commented Apr 27, 2022

I have an external process creating a .gv file, and I want to use the {{#include path/to.gv}} directive to include the file:

{{#include path/to.gv}}

This fails, as apparently the include directive is interpreted as raw graphviz code:

2022-04-27 11:34:10 [INFO] (mdbook::book): Book building has started
Warning: The graphviz plugin was built against version 0.4.15 of mdbook, but we're being called from version 0.4.17
Error: <stdin>: syntax error in line 1 near '{'
Error response from Graphviz
2022-04-27 11:34:10 [ERROR] (mdbook::utils): Error: The "graphviz" preprocessor exited unsuccessfully with exit status: 1 status

It would be nice if this was supported, or another way to embed a rendered .gv into mdbook.

@dylanowen
Copy link
Owner

I haven't played around with included files yet but was this with something like:

```dot process
{{#include path/to.gv}}
```

?

@flokli
Copy link
Contributor Author

flokli commented Apr 27, 2022

I haven't played around with included files yet but was this with something like:

```dot process
{{#include path/to.gv}}

?

Yeah, sorry, that's what I wanted to write, but github did interpret it.

@dylanowen
Copy link
Owner

Gotcha, yeah you have to layer the code block deliminators https://github.com/dylanowen/mdbook-graphviz/blob/master/Readme.md?plain=1#L34

flokli added a commit to flokli/mdbook-graphviz that referenced this issue Apr 28, 2022
@flokli
Copy link
Contributor Author

flokli commented Apr 28, 2022

@dylanowen yes, you were right - using the preprocessors and their orders was the right fix. I opened #33, which adds a section into the Readme explaining this. PTAL!

flokli added a commit to flokli/mdbook-graphviz that referenced this issue Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants