Search code examples
htmlgithub-pages

Adding favicon to websites hosted on github pages


I'm trying to add favicon to my webpage on github but it does not seem to appear.

<link rel="shortcut icon" href="images/my_logo.ico?" type="image/x-icon" sizes="16x16">

I have searched for it online and, implemented those solutions but it does not seem to work

solutions I have tried:

1.added a "?" at the end of href link

2.Moved it from images folder to root folder


Solution

  • Is the path to the icon correct?

    For ex., there is

    <link rel="icon" href="/assets/images/favicon.png">
    

    on my blog powered by GitHub. And the favicon image location is

    github.com/{USER_NAME}/{USER_NAME}.github.io/tree/master/assets/images/favicon.png