html - Unable to set favicon using Jekyll and github pages -


i trying set favicon.ico github page, doesn't work. when serve locally see standard "empty" favicon , when push see facebook icon. why so? have right favicon.ico in root directory of project , added line

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"> 

to relevant default.html. can see sources here: https://github.com/drorata/drorata.github.io

i cloned project github take @ it. after serving using jekyll, favicon did not display, noted.

i did quick testing converting favicon file .png rather .ico file , changing favicon declaration following, , able display favicon.

<link rel="shortcut icon" type="image/png" href="/favicon.png"> 

i tried getting favicon work while keeping .ico file format, , unable @ first. however, did quick searching , came across question, favicon not displayed firefox.

in question asker had similar issue favicon not showing, , able come quick fix adding ? end of link favicon file in favicon declaration. attempted , worked. here favicon declaration be:

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?"> 

either of 2 methods seem able fix issue. i'd recommend using first method, whereby convert image .png file, seems bit simpler , less hacky.

however, if want keep file .ico file should read on question linked before attempt second method, accepted answer question differed solution. i'm not sure why second method works, , seem little bit hacky.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -