Github language tag

2019-04-04 19:14发布

On Github, some projects are tagged as being of one language or another. How do I add one of these tags. (Objective C, PHP etc.)

3条回答
The star\"
2楼-- · 2019-04-04 20:06

As far as I know, they aren't really tagged - the languages attached to them are the languages which you use in your project. Github looks through the source and figures out to the best of its ability what languages are in use.

If you go to your respository, then to the Graphs tab, you can see the language breakdown.

查看更多
干净又极端
3楼-- · 2019-04-04 20:13

You should be able to Publish or Initial Commit with a sample file specific to the language you want it tagged as (such as an empty .cs file or .js file), then add your whole project; however, it seems like a pain.

I did find if you go to 'Add topics' on the far left under the 'Code' section, you can add all the languages you used for anyone that might be looking close enough at your project.

查看更多
放我归山
4楼-- · 2019-04-04 20:15

A repository can only be tagged with a single language in the search results. That language is the first from language statistics. Language statistics are computed by the open source project Linguist according to the total size of files for each language detected.

You can override language statistics using Linguist overrides. In particular, you can choose to ignore some files from statistics:

directory/to/ignore/* linguist-vendored
*.somextensiontoignore linguist-vendored

or override the detected language:

*.js linguist-language=Java
查看更多
登录 后发表回答