wiki/structured/web.forges.recognize-plain-text-documents.org
Gabriel Arazas 377850d0d1 Update notebook and clean up the folder
I also forget to add the additional solutions from the Exercism
exercises. Whoops...

I'm also getting used to storing code in random places. Time to change
that habit a little bit by storing them in my notebook, instead.
Nothing wrong with that, yeah?!
2021-06-25 13:30:07 +08:00

19 lines
857 B
Org Mode

#+title: Make web forges recognize plain-text documents
#+date: "2021-06-24 18:17:37 +08:00"
#+date_modified: "2021-06-24 18:18:46 +08:00"
#+language: en
Some of the web forges such as GitHub and Gitlab uses [[https://github.com/github/linguist][linguist]] framework to recognize the language and blob files.
By setting Git attributes with =.gitattributes= file, you can set a certain option to make it recognize the plain-text files.
It is what makes the technology list from the repo.
Oftentimes in these web forges, linguist is configured to not detect certain files like plain-text documents (e.g., Markdown, Asciidoctor, Org mode, ReStructuredText).
Here's an example =.gitattributes= file to make Org mode and Asciidoctor documents be recognized.
#+begin_src gitattributes
*.org linguist-detectable=true
*.adoc linguist-detectable=true
#+end_src