首页 > 解决方案 > Custom css file for readme.md in a Github repo

问题描述

I am having trouble verifying the name of the .css file that will modifying the readme.md file at the root of Github repo.

I believe it is:

.github/github.css

but that doesn't seem to do anything to the Markdown. Does anyone know if this is incorrect?

标签: cssgithubmarkdown

解决方案


GitHub 出于安全原因不允许 CSSREADME.md通过 CSS 影响文件(就像您可以将 CSS 注入自述文件中一样,您可以轻松发起网络钓鱼攻击)。这包括通过引用的样式表<link rel>和与<style>.

自述文件采用 markdown 语法,因此可以进行一些样式设置,例如通过占位符图像添加颜色,就像 StackOverflow 上的这里一样。例如,您可以#f03c15使用以下内容添加红色方块:

- ![#f03c15](https://placehold.it/15/f03c15/000000?text=+) `#f03c15`

您还可以使用 、 、 和 之类的东西diffjson影响文本html着色。jscss


推荐阅读