palantirnet/butler

[SPRESS] Cannot include svg icons as a .svg extension when adding inline to twig templates [fix exists]

Opened this issue · 2 comments

Bill fixed this on FAMSF and here is a link to that commit: https://github.com/palantirnet/famsf-digital-stories/pull/100/commits/0650e596aea82beb536cf920424c49ee5647bf2e

I think we should apply this to all butlers, not just famsf's

For some context, in the styleguide we had been saving .svg files as .html files to include them in Spress, because at first it seemed Spress did not support svg includes. The problem was to add them in Drupal we had to include them as .svg, so every svg in the styleguide had to be resaved for Drupal and that got cumbersome as SVGs have been getting redesigned while we have been developing in Drupal.

The fix was simply to add svg to the text_extensions in the config.yml for Spress. I also had to keep the styleguide svg folder inside src/includes and symlink that to our Drupal theme.

Watching SVGs is not the complete fix @patrickfweston. We also need .svg in the list of text extensions. I now see this issue doesn't clearly say we need to be able to add inline SVGs to twig templates by including as .svg.

We need this change for that:
https://github.com/palantirnet/famsf-digital-stories/blob/0650e596aea82beb536cf920424c49ee5647bf2e/styleguide/config.yml#L14

...where svg is included so they can be added to the markup.