将自定义语言添加到GitHub存储库 [英] Add custom language to a GitHub repository

查看:69
本文介绍了将自定义语言添加到GitHub存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将GitHub存储库中的特定文件扩展名标识为自定义语言,并且该语言出现在语言统计图上,我也想选择它将显示的颜色,我想在单个存储库中做到这一点

Is there a way to identify a specific file extension in GitHub repository as a custom language and this language appears on language stats graph, also I want to choose what color it will appear, I want to to do this on a single repository only.

推荐答案

如果该语言受 如何更改GitHub上存储库的语言?",以相应地修改您的.gitattributes.

If the language is one supported by the linguist library, you can make sure your repo recognises it as the main language used in said repository.
See "How to change the language of a repository on GitHub?", to modify your .gitattributes accordingly.

如果您的自定义语言不是受支持的语言之一,那么您可以贡献给语言学家图书馆.

If your custom language is not one of the supported languages, then you can contribute to the linguist library.

我不知道是否进行任何颜色自定义.
虽然 pchaigno (语言学家)确实提到了

I am not aware of any color customization though.
Although, pchaigno (one of the maintainers of linguist) do mentions in the comments:

在Linguist中添加对新语言的支持时,您还可以选择其颜色.
但是,存在一些限制,以确保人眼可以辨别所有语言的颜色(尽可能多).
此外,自定义语言功能已在Linguist存储库中问过两次(
#2627 #2598 ).

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存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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