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

Custom favicon not working #2

Closed
swpd opened this issue Jan 1, 2018 · 6 comments
Closed

Custom favicon not working #2

swpd opened this issue Jan 1, 2018 · 6 comments

Comments

@swpd
Copy link

swpd commented Jan 1, 2018

Putting custom favicon.ico into hexo-site/source didn't work after updating to NexT v6.0.0.

@ivan-nginx
Copy link
Member

ivan-nginx commented Jan 2, 2018

You put your favicon into hexo-site/source/ or hexo-site/source/images?


There is documentation in config file:

To get or check favicons visit: https://realfavicongenerator.net
Put your favicons into hexo-site/source/ (recommend) or hexo-site/themes/next/source/images/ directory.

Default NexT favicons placed in hexo-site/themes/next/source/images/ directory.
And if you want to place your icons in hexo-site/source/ root directory, you must remove /images prefix from pathes.

For example, you put your favicons into hexo-site/source/images directory.
Then need to rename & redefine they on any other names, otherwise icons from Next will rewrite your custom icons in Hexo.

favicon:
  small: /images/favicon-16x16-yoursite.png
  medium: /images/favicon-32x32-yoursite.png

@swpd
Copy link
Author

swpd commented Jan 2, 2018

I put my favicon.ico under the hexo-site/source/ root directory, should I update the favicon path in _config.yml as well?
Such as:

favicon:
     small : /favicon.ico

An earlier release version of NexT doesn't require such an update though.

@ivan-nginx
Copy link
Member

An earlier release version of NexT

What earlier version? This version have no breaking changes in favicon between 5.1.3 / 5.1.4. New favicon style was added in 5.1.3 version, see here releases notes.

should I update the favicon path

Of cource u should. Try to:

1. Put your favicons into hexo-site/source/images directory. For example, your icon named swpd.ico, so, path will be hexo-site/source/images/swpd.ico.
2. Then in NexT config section:

favicon:
  small: /images/swpd.ico

3. After that to check icon use https://realfavicongenerator.net (your browser may cache previous NexT icon, so, need to clear cache).

@swpd
Copy link
Author

swpd commented Jan 2, 2018

What earlier version?

v5.1.2. The only config of favicon was favicon: /favicon.ico in this version.

So after new favicon style was added, I only need to config favicon>small if I don't care about responsive favicon, right?

@ivan-nginx
Copy link
Member

I only need to config favicon>small if I don't care about responsive favicon, right?

U can set only 1 icon, right.

U can also see here about favicon.

@swpd
Copy link
Author

swpd commented Jan 2, 2018

OK. Thank you.

@swpd swpd closed this as completed Jan 2, 2018
@ivan-nginx ivan-nginx changed the title custom favicon not working custom favicon not working [need to update docs] Jan 6, 2018
@ivan-nginx ivan-nginx changed the title custom favicon not working [need to update docs] custom favicon not working [need to set different names for favicons] Jan 9, 2018
@ivan-nginx ivan-nginx changed the title custom favicon not working [need to set different names for favicons] custom favicon not working [solved] Mar 4, 2019
@ivan-nginx ivan-nginx changed the title custom favicon not working [solved] Custom favicon not working [solved] Apr 1, 2019
@theme-next theme-next locked as resolved and limited conversation to collaborators Apr 1, 2019
@stevenjoezhang stevenjoezhang changed the title Custom favicon not working [solved] Custom favicon not working Mar 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants