Closed ericirish closed 7 years ago
Interesting idea.
A current workaround is to create an HTML file, paste your SVG inside, and then use the tag {% include images/my-svg.html %}
I think you could also use a regular pug include tag like:
include my-svg.svg
Just make sure your file is in the ./_includes folder.
Is {% include images/my-svg.svg %}
something that worked in regular Jekyll but then stopped working after you installed Jekyll-pug? Just want to make sure I am not breaking any sort of functionality.
logo.svg
added to _includes
folder{% include logo.svg %}
added to _includes/header.html
Included file 'logo.svg.pug' not found in _includes directory
@shaqonline Yep, that's a bug I have to fix. It's an easy fix luckily.
For now, you could rename logo.svg
to logo.html
and use the code {% include logo.html %}
.
@ecirish @shaqonline Very good news! I released version 1.0.1
of Jekyll-Pug with many improvements.
One of those improvements being SVG include support.
You could also use regular Pug includes too, as they are fully functional now.
I commonly use pug includes to render SVGs inline. It would be great to be able to include them with the liquid markup like
{% include images/my-svg.svg %}
.