hugo-book
hugo-book copied to clipboard
Add a parameter `BookFaviconExt` to be able to change favicon extention
Hi 😄 Thank you for great template!
BTW, my website uses webp
as favicon file, and I want to use it on other site using hugo-book too.
But hugo-book supports only favicon.png
(right?)
I understand I can use webp
if changing template directly.
This PR is a little contribution for thanking.
I hope you like.
Thanks.
Hi! Thanks for the PR, I'm still thinking/considering how to solve it in best way, I'm hestant to add more configuration parameters as it sooner or later will grow out of control. So I'm still thinkig on this one.
Perhaps it should be a reference/url of favicon file, rather than just file extension 🤔
I'm hestant to add more configuration parameters as it sooner or later will grow out of control.
better than forking
{{- if default false .Site.Params.BookFaviconPath -}}
<link rel="icon" href="{{ .Site.Params.BookFaviconPath | relURL }}"
type="{{ .Site.Params.BookFaviconMimeType }}">
{{- else -}}
<link rel="icon" href="{{ "favicon.png" | relURL }}" type="image/png">
{{- end -}}
?
I have added BookFavicon
option