directly embed element as site logo
- This topic has 3 replies, 2 voices, and was last updated 11 months, 2 weeks ago by .
- August 19, 2020 at 10:03 pm #3578btrem
I read the (closed) forum 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?August 20, 2020 at 8:42 am #3582Bob
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!August 20, 2020 at 4:49 pm #3587btrem
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.August 21, 2020 at 1:45 pm #3592Bob
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!
- You must be logged in to reply to this topic.