github-linguist

How can I highlight .gitignore code for my README.md?

只愿长相守 提交于 2021-02-05 11:14:36
问题 I wrote a README.md with parts of code and I want to highlight those parts with the right colors. One of this code is a .gitignore code , that I would like to integrate to my README.md . But I can't have the good linguist highlight for this, which colorize in green my comments for example. I have searched some languages detected by GFM but I am not satisfied by the results. Can someone help me to find the good linguist ? P.S. : I also want to question for a DockerFile, docker-compose in a

Changing repository language on GitHub

十年热恋 提交于 2020-01-13 04:12:13
问题 I've noticed that Github picked JavaScript as the language for my Django app: Is it possible to change it to Python? Or do I need to make a new repository? Solved: As @Geno Chen said, to change the repository language we have to add the file .gitattributes containing this code: # to change language of repo from Javascript to Python *.js linguist-language=Python 回答1: The language detector stats the programs in your projects and shows the result with the ratio. If your repository have detected

How can I use the languages YAML file to determine which keywords work for any given language?

北战南征 提交于 2020-01-05 05:27:06
问题 There is a page on GitHub Help describing how to use syntax-highlighted code blocks. On that page there are instructions describing how to match languages to their keywords for this purpose: We use Linguist to perform language detection and syntax highlighting. You can find out which keywords are valid in the languages YAML file. However, there's a lot of data in that YAML and I don't find it very clear how exactly one can use it to determine which keywords work for any given language. I

Why changing GitHub repository language not working?

一世执手 提交于 2019-12-23 04:35:36
问题 i have been made a repository in GitHub with as Xcode project with Objective-C language. Beside .gitignore file in root of my project made .gitattributes file and set this code in it: * linguist-vendored *.objective-c linguist-vendored=false But does not show any language in Github homepage. 回答1: The first part of .gitattributes rules must match files in the repository. Unless your Objective-C files have .objective-c for file extension, the above will not work. The following should work: *

Paths not excluded from Github language statistics

自闭症网瘾萝莉.ら 提交于 2019-12-10 10:08:51
问题 I've already read about related SO threads here and here, as well as Github Linguist manual override, but I cannot seem to be able to exclude some top-level directories from language statistics. At its current latest version, this repo shows a predominance of HTML code. Clicking on the HTML details, two HTML files are listed: packages/NUnit.2.5.7.10213/NUnitFitTests.html Last indexed on 30 Dec 2016. packages/NUnit.2.5.7.10213/Tools/NUnitFitTests.html Last indexed on 30 Dec 2016. but those

Changing repository language on GitHub

故事扮演 提交于 2019-12-05 20:16:15
I've noticed that Github picked JavaScript as the language for my Django app: Is it possible to change it to Python? Or do I need to make a new repository? Solved: As @Geno Chen said, to change the repository language we have to add the file .gitattributes containing this code: # to change language of repo from Javascript to Python *.js linguist-language=Python The language detector stats the programs in your projects and shows the result with the ratio. If your repository have detected a wrong language, you can follow the tutorial , most of the time you just need to override the result with a

Paths not excluded from Github language statistics

微笑、不失礼 提交于 2019-12-05 19:41:26
I've already read about related SO threads here and here , as well as Github Linguist manual override , but I cannot seem to be able to exclude some top-level directories from language statistics. At its current latest version, this repo shows a predominance of HTML code. Clicking on the HTML details, two HTML files are listed: packages/NUnit.2.5.7.10213/NUnitFitTests.html Last indexed on 30 Dec 2016. packages/NUnit.2.5.7.10213/Tools/NUnitFitTests.html Last indexed on 30 Dec 2016. but those should be part of excluded paths within .gitattributes : .nuget/* linguist-vendored libs/* linguist