Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

allow partials to have different extensions

  • #3945
    Avatar photo[anonymous]

    It would be nice if developers could include partials with extensions other than `.hbs`, so that a template could include an svg file, e.g.

    {{> logo.svg}}
    

    Maybe in such a case, Publii could first look for “logo.svg.hbs” as it does now, and if it doesn’t find it, then look for “logo.svg”. Or maybe a configurable list of extensions that would preclude attaching “.hbs” to a partial, so that if Publii were configured for “.svg” and came across the above line, it would not attach a second extension of “.hbs”.

    #3952
    Avatar photoBob

    Publii themes use the Handlebars templating language and we do not plan to change this behavior.
    If you want to attach the SVG file with the partials just name this file for example mysvg.hbs and paste your SVG code into it.