I'm using a markup language called AsciiDoc (*.adoc). I'd like to name my *.adoc files as *.txt [^1]. However, then GitHub (of course) doesn't draw .txt files as .adoc files.
So I tried to override the file types using .gitattributes as this:
*.txt linguist-language=AsciiDoc
But it didn't work. Any help? Thanks.
[^1]: Since Dropbox doesn't support editing .adoc files, I'm using .txt for AsciiDoc files.
It seems that linguist-language correctly syntax highlight the file but fail to render markup. I've found that emacs and vim modelines actually works for rendering markup though.
So a workaround would be to add the following in each txt files :
////
vim:ft=asciidoc
////
or if you prefer emacs :
////
-*- mode: asciidoc;-*-
////
Checkout this gist
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With