简体   繁体   English

将网站图标添加到托管在 github 页面上的网站

[英]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.我正在尝试在 github 上的网页中添加网站图标,但它似乎没有出现。

<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 "?" 1.加了一个“?” at the end of href link在href链接的末尾

2.Moved it from images folder to root folder 2.将其从图像文件夹移动到根文件夹

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.在我的博客上,由 GitHub 提供支持。 And the favicon image location is并且图标图像位置是

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM