Skip to content

Support for raw include for inlining CSS, SVG, etc. #370

@manastungare

Description

@manastungare

I’d like to inline tiny bits of CSS and a few SVG images for performance-critical paths. I found that {% include file.css %} tries to parse the inlined file as HTML, which, of course, fails for CSS & SVG.

Invalid syntax for include tag. File contains invalid characters or sequences:

{% raw %} doesn’t quite work either, since that prevents transclusion in the first place.

Something like include_raw or include file.css raw=true could include the raw files, but treat them as opaque non-markup text.

Is this something Liquid could support?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions