A custom Punch content parser to passthrough SVG fragments for page content.
-
Install the package:
npm install punch-svg-fragment-content-parser
-
Open your Punch project's configurations (
config.json
) and add the following:"plugins": { "parsers": { ".svg": "punch-svg-fragment-content-parser" } }
-
Much like you would create extended content fragments in markdown, create them in SVG with the extension .svg. The contents of the .svg file will be included unparsed.