github - 将自定义语言添加到 GitHub 存储库

标签 github

有没有办法将 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/

相关文章:

git - 推送存储库时如何在不同用户(github 帐户)之间切换?

android - 我在版本控制的 android studio VCS checkout 中找不到 Github

Python Black Code Formatter - 在将项目提交到 Github 之前是否有任何方法可以应用自动黑色格式化

python - 什么是非侵入式负载监控或能量分解或功率特征分析?

github - 如何在 github issue tracker 中高效编辑 Markdown?

github - 使提交消息在 bitbucket 中显示为注释

java - 将 maven pom.xml 上传到 Git 存储库?

ios - Firebase:我应该将 GoogleService-Info.plist 添加到 .gitignore 吗?

git - 不小心把master merge 到develop然后push

git - 如何在 git 中的特定哈希(提交)处 checkout 代码