简体   繁体   English

使用 README 时在 GitHub 页面上设置一个图标

[英]Set a favicon on GitHub pages when using a README

I have Pages enabled for my GitHub repository.我为我的 GitHub 存储库启用了页面。 The data is coming from my README.md file, as I have no index.html in the repository.数据来自我的README.md文件,因为我在存储库中没有index.html This is what I want.这就是我要的。 However, I'm trying to get a favicon for my page, and I can't figure it out.但是,我正在尝试为我的页面获取一个图标,但我无法弄清楚。 All the guides online describe using <link rel> with a favicon, as one would in HTML, but I don't see anything for when automatically feeding the page data from the repository's README.所有在线指南都描述了如何使用带有图标的<link rel> ,就像 HTML 中的那样,但是当自动从存储库的 README 提供页面数据时,我没有看到任何内容。

I'm not sure what I can provide as a minimal replicable example.我不确定我可以提供什么作为最小的可复制示例。 Below are the source and theme settings from the repository's Pages settings.以下是存储库页面设置中的源和主题设置。

存储库页面设置。

Thanks.谢谢。

Unless Github adds this feature, the only way you can do it is by editing the HTML files.除非 Github 添加此功能,否则唯一的方法就是编辑 HTML 文件。 You can do it by adding to your repository the theme layout file and editing it.您可以通过将主题布局文件添加到存储库并对其进行编辑来实现。

Someone had the same issue and described the solve it here: https://github.com/pages-themes/cayman/issues/93有人遇到了同样的问题并在此处描述了解决方法: https://github.com/pages-themes/cayman/issues/93

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

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