带有GitHub Pages的Favicon [英] Favicon with GitHub Pages

查看:116
本文介绍了带有GitHub Pages的Favicon的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在托管一些带有GitHub Pages(用户页面和Project页面)的站点,但是它们没有在浏览器中显示其图标.

I'm hosting a few sites with GitHub Pages (User and Project Pages), but they are not displaying their favicons (in the browser).

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

GitHub是否显示带有<frameset>的网站的问题?我知道可以显示收藏夹图标(至少使用Jekyll),但是我可以自己显示收藏夹图标吗?

Is the problem that GitHub displays the site with <frameset>? I know it's possible to display favicons (at least with Jekyll), but can I display a favicon on it's own?

推荐答案

是的,可以.

将其放入网页的head部分:

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

重要的是,不要在favicon.ico部分前放置斜杠.将favicon.ico文件放入存储库的主目录中.

It is important to not put the slash before the favicon.ico part. Put the favicon.ico file in your repository's home directory.

这篇关于带有GitHub Pages的Favicon的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆