[Feature] Mermaid and graphviz diagrams#47
[Feature] Mermaid and graphviz diagrams#47sneakers-the-rat wants to merge 5 commits intoopenjournals:mainfrom
Conversation
|
Thank you! I'm not sure yet about #45, but the other PRs look good. I'm holding off a little longer, as we should also update the pandoc version in the docker container, which is proving a bit more difficult than expected. |
27b3869 to
f60e65e
Compare
|
Thoughts on this? I rebased and the test is now failing for a reason that is totally mysterious to me. Looks like it's not this PR: https://github.com/openjournals/inara/actions/runs/9450955436/job/26030778792 |
|
Looking good. I still have some reservations, mostly because of the tremendous size of the mermaid-cli tool: it requires a full browser to be installed in the docker image, making the image more difficult to use for people with bad/limited internet connections. CC @arfon, I'd be interested to hear your take on this. As for the test failures: yes, that's just a problem with the test workflow: the login and push actions should only run on the main branch. Otherwise they'll fail due to insufficient permissions. |
oops, ya you're right. there's gotta be a smaller tool than that, mermaid.js is like 3MB. i'll take a look
I guess that's the next fix then :) but there also seems to be a failure in the pdf build that looks unrelated? like a latex error? and it started happening in other PRs too recently |
|
I've opened #70 to keep track of the PR issue. |
|
Definitely would be cool so support this so thanks for the contribution here @sneakers-the-rat! Did you manage to find a smaller Docker image to support this? |
|
now that i'm thinking about this again, i think we'll also want version pinning, especially re: mermaid. maybe we can do both things at once - i wonder if there is a way to peek at the yaml frontmatter when making the docker image? and if we did that we could see if a given doc uses a particular dependency. I think we'll want to do this generally if we want to do flexible document formatting (which i think would be a lovely goal), so let me take a look at that, unless y'all know of a way already :) |
|
Looking forward to this implementation! Any news @sneakers-the-rat on this one? Thanks again for all the nice work:) |
|
it's mostly stalled on my refusal to learn any more about docker than i have to lol, i have no idea why installing node ~80MB and mermaid ~3MB ends up bloating the image so much, but i'll try again maybe using bun or by |
Fix: openjournals/joss#1281
Builds on:
Add support for graphviz and mermaid diagrams using https://github.com/pandoc-ext/diagram
example/paper.mdWorks in the
tex,html, andjatsformatseg. PDF:
Also added an example of how to include a highlighted code block because i thought it was weird we didn't have one
(Again sorry for non-modular PR, couldn't get the code to run otherwise)