Sign in

directly embed element as site logo

  • This topic has 3 replies, 2 voices, and was last updated 3 years, 1 month ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3578
    Avatar photobtrem

    I read the (closed) forum topic “Website Logo SVG”

    https://forum.getpublii.com/topic/website-logo-svg/

    Publii puts the svg in an element. What’s the best way to embed logo.svg directly in the page markup?

    #3582
    Avatar photoBob
    btrem wrote:

    Publii puts the svg in an element. What’s the best way to embed logo.svg directly in the page markup?

    I think you should edit the top.hbs or navbar.hbs file located in the partials folder ‎⁨(Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME ▸ partials)

    --
    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!

    #3587
    Avatar photobtrem

    So in other words don’t use the upload dialog to upload the logo, but rather include it in the theme. Yeah, I’m doing that, but there’s another (minor) issue: I have two header files that need logo.svg. So I want logo.svg to be a partial, that way I can just include it. But the extension must be .hbs, but the logo has .svg. I can rename it to logo.svg.hbs, but that’s a little clunky, since my editor won’t treat .svg.hbs as an svg file. Any thoughts? I searched the web for ways to include files with different extensions, but haven’t figured it out yet.

    If there’s no solution, then I’ll have to go the clunky route and rename the file if I need to edit it, then rename it back before building the site.

    #3592
    Avatar photoBob

    I can see only one reason why it is worth embedding the SVG file in a different way than the default one – its control e.g. via CSS.

    So if you need to embed your SVG file into the theme source file put the code in two places instead of creating the hbs file.

    --
    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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.