15

I'm writing a small DSL, and I'm curious if it's possible to somehow show it in a language bar above the repository source where all languages are listed by percentage of using or GitHub administration needs to allow that language?

For example, I'm writing a Ruby project with the DSL called Puppy, and I want to show the percentage of all files with the .puppy extension beside other languages.

pchaigno
  • 11,313
  • 2
  • 29
  • 54
Nikola Stojaković
  • 2,257
  • 4
  • 27
  • 49

3 Answers3

11

Looks like you need add your language to Linguist library (https://github.com/github/linguist) which GitHub utilize to recognize source code languages.

according to: https://help.github.com/articles/my-repository-is-marked-as-the-wrong-language/

R A
  • 827
  • 13
  • 25
9

GitHub uses github/linguist to recognize languages, including to display which languages the project is made up of in the navigation bar.

For your .puppy files to be recognized by GitHub (and put in the language list), you would need to contribute to that repository.

intboolstring
  • 6,891
  • 5
  • 30
  • 44
1

As Rafail Akhmetshin and intboolstring wrote, you'd need to add support for your language in the open source project Linguist if you want to use it in your repository. There's however a requirements on in-the-wild usage across github.com. See the guidelines for more information.

The custom language feature (being able to define a syntax without having to first add support for it in Linguist) has been requested twice on the Linguist repository: #2627 and #2598. There are, however, some technical and legal concerns to address before this could be implemented (see #2627 in particular).

pchaigno
  • 11,313
  • 2
  • 29
  • 54