luizdepra / hugo-coder

A minimalist blog theme for hugo.
MIT License
2.65k stars 1.05k forks source link

No favicon loaded if no favicon.svg exists #897

Open dani0854 opened 4 months ago

dani0854 commented 4 months ago

Describe the problem:

According to: https://github.com/luizdepra/hugo-coder/blob/745f785dd9a76b5102e6e58c9e5e550c458a6273/layouts/partials/head/custom-icons.html

All the icons are specified, no matter if they are configured or not. In my case I don't have favicon.svg, since I only have rasterized images, and turning them into vector images is painful. I only specified favicon{16x16,32x32}.ico.

But since the resulting HTML has all of them specified with default paths for ones I didn't specify. It looks like browser (I am using Firefox) is choosing to only load favicon.svg which I don't have, and it results in the page opening without favicon.

On other pages though Firefox has no problem loading favicon{16x16,32x32}.ico.

I am not an expert in web development. But I assume there should be a way to disable certain favicons if they are not used, so they don't appear in resulting HTML files.

Steps to reproduce:

  1. Specify paths in config for only favicon{16x16,32x32}.ico
  2. Open the page with Firefox

Observed Results: