Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR `/favicon.png' not found. #19

Closed
marcello-dev opened this issue Oct 9, 2019 · 3 comments
Closed

ERROR `/favicon.png' not found. #19

marcello-dev opened this issue Oct 9, 2019 · 3 comments

Comments

@marcello-dev
Copy link

This error shows up when serving the website with the command:
bundle exec jekyll serve
I think is because the favicon.png file is hardcoded here:

<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/favicon.png" />

If I download the favicon.png from your repo and put it in my project folder, then the error disappears. But what if I want to change the shortcut icon?

@chrisrhymes
Copy link
Owner

Hi,

Thanks for reporting this. I added the favicon url from this pull request. I intended to package a default favicon with the theme but it doesn't seem to have worked so I'll take a look at that when I can.

Do you think it would be useful to have a variable in the _config.yml to overwrite the default favicon path? Something like:

favicon: path/to/favicon.png

Then update the head.html to the following:

 <link rel="shortcut icon" type="image/png" {% if site.favicon %} href="{{ site.favicon | prepend: site.baseurl }}" {% else %} href="{{ site.baseurl }}/favicon.png" {% endif %} /> 

@marcello-dev
Copy link
Author

Yes, this fix looks good, thanks!
In the README you can specify that png is the extension supported for now. Unless you want to parametrize it too.

@chrisrhymes
Copy link
Owner

@marcello-dev I've updated the readme as suggested and also added the ability to override the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants