hugo-book icon indicating copy to clipboard operation
hugo-book copied to clipboard

Add a parameter `BookFaviconExt` to be able to change favicon extention

Open syguer opened this issue 2 years ago • 2 comments

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.

syguer avatar Jun 28 '22 08:06 syguer

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.

alex-shpak avatar Jul 19 '22 15:07 alex-shpak

Perhaps it should be a reference/url of favicon file, rather than just file extension 🤔

alex-shpak avatar Aug 02 '22 10:08 alex-shpak

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

?

milahu avatar Sep 26 '22 14:09 milahu

I have added BookFavicon option

alex-shpak avatar Aug 08 '23 10:08 alex-shpak