Closed gp-dublincentral closed 9 months ago
Agreed 👍
Hi,
I've been trying to add an svg to this template and I cannot get the svg.html to rebuild.
I tried running yarn build
to no avail.
Help would be greatly appreciated.
Thanks.
I'm also running into this when trying to add a new SVG.
The SVG compilation process to update svg.html
doesn't seem to happen at all.
I found a similar project that uses svgmin with gulp instead of webpack. Maybe that is useful for fixing the svg processing here. https://github.com/darindimitroff/netlify-cms-template/blob/master/gulpfile.babel.js#L52-L67
Even easier, Hugo's builtin resources.Minify looks like it should take care of SVGs, and the icons can be inline.
I vote for the Hugo minifier and using them inline. It's the least amount of work.
- Do you want to request a feature or report a bug? What I think is a bug or at least inaccuracy in the docs
- What is the current behavior? In the SVG section od https://github.com/netlify-templates/one-click-hugo-cms/blob/master/README.md it says:
1/ automatically optimized with SVGO (gulp-svgmin)
2/ concatenated into a single SVG sprite stored as a a partial called svg.html
I don't think either of these things are happening.
- If the current behavior is a bug, please provide the steps to reproduce.
Add a new icon (e.g. icons-whatsapp.zip ) to site\static\img and neither of the above steps seems to happen
- What is the expected behavior?
A previous version used to have a build command that would merge/overlay site\static\img\icon.svg with each of site\static\img\icons-* and create the SVG snippet that could be inserted into site\layouts\partials\svg.html
I think the docs should be updated to reflect what is happening or vice versa.
- Please mention your node.js, NPM, Hugo and operating system version.