Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I display asciidoc document in github?

Am I able to display an asciidoc file on github in the same way that I can currently view a markdown file? According to this blog entry, I should be able to do this:

If you’re interested in using AsciiDoc, head over to GitHub and create a new file in one of your repositories or gists using the file extension .asciidoc or .adoc.

However I tried to do this and it did not work. Can anyone tell me how to get an asciidoc document to display the nicely formatted text on Github?

Here is a document that I was trying to test with Asciidoc. https://github.com/00krishna/proj_blog/blob/master/test.adoc

like image 648
krishnab Avatar asked Jun 17 '15 21:06

krishnab


People also ask

Does GitHub support AsciiDoc?

GitHub uses Asciidoctor in safe mode to render files with the extension . adoc , . ad , and . asciidoc .

What is AsciiDoc format?

AsciiDoc is a text document format that was explicitly designed with the needs of publishing in mind, both print and web. It supports all the structural elements necessary for writing notes, documentation, articles, books, ebooks, slideshows, web pages, technical manuals and blogs.


2 Answers

Your file isn't syntactically valid (or rather the line is treated as plain text).

Your original file:

==This is a test
this is a test of using asciidoc

There's no space after the ==; I believe it's required.

A modified version that displays correctly:

== This is a test
this is a test of using asciidoc

See test.adoc and test2.adoc in this Gist.

The syntax for this feature, "One line titles", is documented in the Asciidoc user guide, section 11.2.

like image 68
Keith Thompson Avatar answered Oct 17 '22 02:10

Keith Thompson


As a supplement to the accepted answer, Github (or at least the Wiki portion of Github) only accepts the .asciidoc suffix. .adoc and .ad don't seem to work. I only came upon this because I tried to manually change the pages in the wiki from .md to .ad and they wouldn't render, so check this if your problem persists.

like image 26
Joseph Glover Avatar answered Oct 17 '22 02:10

Joseph Glover