Skip to content

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

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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