Closed wouter-veeken closed 2 years ago
Could you please share a repository that reproduces this issue?
Since you are using a relative path (i.e., !include ./docs/diagrams/puml-stylesheet.puml
), Node.js will use the current working directory to resolve this relative path.
My guess is that the working directory when running the gatsby
command to generate your site is not the root of your project. Hence, ./docs/diagrams/puml-stylesheet.puml
is not correctly resolved.
You can debug/add console.log statements in this function to troubleshoot:
You can use process.cwd()
to get the current working directory of your process (Gatsby).
Could you please share a repository that reproduces this issue?
I'm afraid this is in a private repo, sorry :/
I'm going to try the logging you suggested, thanks!
@Mogztter your assumption was correct: I run Gatsby from /site
so that's obviously considered the root folder. Makes perfect sense in hindsight, of course. Changing the path to ../docs/diagrams/
has the intended outcome. 👍 Many thanks for the help!
You're welcome 😊
I'm struggling with an issue similar to #288, but using Asciidoctor JS in a Gatsby site.
I'm trying to include a standard "stylesheet" file in every PUML diagram with the
kroki-plantuml-include
attribute, but I can't figure out whatkroki-plantuml-include-paths
considers to be my root folder. This is my file/folder structure:In
gatsby-config.js
, I've defined this:But I keep getting:
I've verified that it works with an absolute path (i.e.
/Users/myName/git_tree/etc
) but none of the relative paths I've tried work.Any guidance? Thanks in advance!