wiki/_next/data/Ie9t5zutrXP6Of75Cb5xF/web.forges.recognize-plain-text-documents.json

1 line
2.0 KiB
JSON
Raw Permalink Normal View History

2022-07-29 15:41:17 +00:00
{"pageProps":{"metadata":{"date":"\"2021-06-24 18:17:37 +08:00\"","date_modified":"\"2021-07-20 23:32:51 +08:00\"","language":"en","source":""},"title":"Make web forges recognize plain-text documents","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Some of the web forges such as GitHub and Gitlab uses "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/github/linguist"},"children":[{"type":"text","value":"linguist"}]},{"type":"text","value":" framework to recognize the language and blob files.\nBy setting Git attributes with "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":".gitattributes"}]},{"type":"text","value":" file, you can set a certain option to make it recognize the plain-text files.\nIt is what makes the technology list from the repo.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Oftentimes in these web forges, linguist is configured to not detect certain files like plain-text documents (e.g., Markdown, Asciidoctor, Org mode, ReStructuredText).\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Here's an example "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":".gitattributes"}]},{"type":"text","value":" file to make Org mode and Asciidoctor documents be recognized.\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-gitattributes"]},"children":[{"type":"text","value":"*.org linguist-detectable=true\n*.adoc linguist-detectable=true\n"}]}]}]},"backlinks":[]},"__N_SSG":true}