有没有办法将 GitHub 存储库中的特定文件扩展名识别为自定义语言,并且该语言出现在语言统计图上,我还想选择它显示的颜色,我想在单个存储库上执行此操作仅。
最佳答案
如果语言是支持的语言linguist library ,您可以确保您的存储库将其识别为所述存储库中使用的主要语言。
请参阅“How to change the language of a repository on GitHub?”,相应地修改您的 .gitattributes
。
如果您的自定义语言不是 one of the supported languages , 那么你可以 contribute to the linguist library .
虽然我不知道有任何颜色定制。
虽然,pchaigno
(maintainers of linguist 之一)提及 in the comments :
When adding support for a new language in Linguist, you can also choose its color.
There are, however, some restrictions to make sure all languages' colors can be distinguished by the human eye (as much as possible).
Also, the custom language feature has been asked twice on the Linguist repository (#2627 and #2598).
关于github - 将自定义语言添加到 GitHub 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42593670/