Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add markdown as language #5951

Closed
kaffarell opened this issue Jun 27, 2022 · 4 comments
Closed

Add markdown as language #5951

kaffarell opened this issue Jun 27, 2022 · 4 comments
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist

Comments

@kaffarell
Copy link

Language name

markdown

Most popular extensions

.md

Is there a reason why markdown isn't included as a language?
It really sucks, cause I have a big repository with a lot of markdown files as documentation, and a single js file. The repository thus shows 100% percent js usage, and now 99% of all the programming languages used on my github account is javascript.

@kaffarell kaffarell added Add Language Good First Issue This is a great opportunity to start contributing to Linguist labels Jun 27, 2022
@Nixinova
Copy link
Contributor

Nixinova commented Jun 28, 2022

Markdown is already a language, it is just not included in the repository statistics because it is not code.

Linguist starts by going through all the files in a repository and excludes all files that it determines to be binary data, vendored code, generated code, documentation, or are defined as data (e.g. SQL) or prose (e.g. Markdown) languages, whilst taking into account any overrides.
"How Linguist works"

If you want Markdown to be included in the repository statistics you need to use an override in your /.gitattributes file:

*.md linguist-detectable

Then Markdown will be included in the results the next time GitHub refreshes your repo's language stats.

@kaffarell
Copy link
Author

Perfect, thank you!

delphidabbler added a commit to ddablib/ddablib.github.io that referenced this issue Sep 12, 2022
Add entry to make GitHub detect .md files in language stats
Fix per github-linguist/linguist#5951
delphidabbler added a commit to delphidabbler/ddab-lib-docs that referenced this issue Sep 12, 2022
Add entry to make GitHub detect .md files in language stats
Fix per github-linguist/linguist#5951
delphidabbler added a commit to delphidabbler/delphidabbler.github.io that referenced this issue Sep 12, 2022
Add entry to make GitHub detect .md files in language stats
Fix per github-linguist/linguist#5951
@Suman373
Copy link

Suman373 commented Oct 4, 2022

Markdown is already a language, it is just not included in the repository statistics because it is not code.

Linguist starts by going through all the files in a repository and excludes all files that it determines to be binary data, vendored code, generated code, documentation, or are defined as data (e.g. SQL) or prose (e.g. Markdown) languages, whilst taking into account any overrides.
"How Linguist works"

If you want Markdown to be included in the repository statistics you need to use an override in your /.gitattributes file:

*.md linguist-detectable

Then Markdown will be included in the results the next time GitHub refreshes your repo's language stats.

Thanks for the nice explanation!!

gledos added a commit to gledos/ggame that referenced this issue Oct 26, 2022
@ggorlen
Copy link

ggorlen commented May 11, 2023

*.md linguist-detectable wasn't enough for linguist to recognize a repo with only a README.md in it. I followed this post (found via #3964 (comment)).

/.gitattributes:

*.md linguist-vendored=false
*.md linguist-generated=false
*.md linguist-documentation=false
*.md linguist-detectable=true

A more minimal version that also worked for me:

*.md linguist-documentation=false
*.md linguist-detectable

twangodev added a commit to frc2204/ramdocs that referenced this issue Oct 8, 2023
meator added a commit to xbps-src-tutorials/xbps-src-tutorials.github.io that referenced this issue Apr 30, 2024
See github-linguist/linguist#5951

With this, GitHub will no longer describe this repo as 95% shell (which
is incorrect).
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist
Projects
None yet
Development

No branches or pull requests

4 participants