Is it possible to detect language used in README.md? #6602
-
Hi, I have a repository that contains only README.md with some PHP and SQL. I'm trying to make Linguist detect language of the repository by adding these lines to
This doesn't work. I wonder is there a way to set SQL as a language used in the repository? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, Linguist does not detect the languages used in a README.md as Linguist doesn't support multiple languages per file and README.md files are technically markdown, which is detected, though not counted by default.
Yes, but keep in mind that your repo doesn't technically contain SQL files... it only contains markdown files. So the only way is to override the Another option is to pull those out into individual files (so your repo really does contain SQL files) or use a topic to give an indication the repo contains SQL and leave things as-is. |
Beta Was this translation helpful? Give feedback.
No, Linguist does not detect the languages used in a README.md as Linguist doesn't support multiple languages per file and README.md files are technically markdown, which is detected, though not counted by default.
Yes, but keep in mind that your repo doesn't technically contain SQL files... it only contains markdown files. So the only way is to override the
.md
extension language, but that then comes with the caveat that the files will be considered SQL and not markdown. I'm not sure what would happen in terms of rendering, but I know the syntax highlighting will likely look wrong as the SQL grammar would be appli…