Sign in

allow partials to have different extensions

  • This topic has 1 reply, 2 voices, and was last updated 5 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3945
    btrem

    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
    Bob
    Support

    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.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.