Stream: IG creation
Topic: Jekyll fails when inlining SVG
Carl Anderson (Mar 12 2021 at 20:28):
I'm probably not specifying the path to my SVG correctly, but I see this stack trace in the auto builder logs:
onGenerate:
Generating Summary Outputs (00:44.0606)
Sending Usage Stats to Server (00:44.0913)
## Memory (MB): Use = 1509, Free = 16857, Total = 18366, Max =18366
Reclaiming memory...
## Memory (MB): Use = 472, Free = 17894, Total = 18366, Max =18366
Jekyll: Source: /scratch/ig-build-temp-93BK0Z/repo/temp/pages (00:47.0128)
Jekyll: Generating... (00:47.0128)
Jekyll has failed. Complete output from running Jekyll: [31m Liquid Exception: Could not locate the included file 'images/post-message.svg' in any of ["/scratch/ig-build-temp-93BK0Z/repo/temp/pages/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your s (00:47.0554)
Note: Check that Jekyll is installed correctly (00:47.0554)
Publishing Content Failed: Process exited with an error: 1 (Exit value: 1) (00:47.0555)
(00:47.0555)
Use -? to get command line help (00:47.0555)
(00:47.0555)
Stack Dump (for debugging): (00:47.0555)
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
at org.hl7.fhir.igtools.publisher.Publisher.runJekyll(Publisher.java:5624)
at org.hl7.fhir.igtools.publisher.Publisher.runTool(Publisher.java:5528)
at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4974)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:888)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8424)
My repo is here: https://github.com/HL7/smart-web-messaging/tree/FHIR-29387
When I try to inline SVG like this:
<div>
{%include images/post-message.svg%}
</div>
What is the correct relative path for my SVG at the point when Jekyll inlines the SVG? Do I need an extra "../"?
Carl Anderson (Mar 12 2021 at 20:29):
Build log is here: https://build.fhir.org/ig/HL7/smart-web-messaging/branches/FHIR-29387/failure/build.log
Lloyd McKenzie (Mar 12 2021 at 20:44):
Right. You can't put SVG you plan to inline in the 'images' folder - the contents of that folder just gets dumped across to output. You'll want to stick them in the 'includes' folder, alongside menu.xml
Eric Haas (Mar 16 2021 at 01:44):
I use this technique for all my figures and SVG works fine as well
Last updated: Apr 12 2022 at 19:14 UTC