Skip to content

Instantly share code, notes, and snippets.

@eloots
Last active April 26, 2021 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eloots/f8d74011ec64e81fc61833efcfa544d7 to your computer and use it in GitHub Desktop.
Save eloots/f8d74011ec64e81fc61833efcfa544d7 to your computer and use it in GitHub Desktop.
Installation of asciidoc on Mac

AsciiDoctor Base installation

Use gem to install asciidoctor. Follow the instructions in the documentation section of the asciidoc website.

Note: I had to quit the current terminal session and start a new one after which the asciidoctor command became available.

Converting markdown sources to asciidoc

This can be done using kramdown. I followed the instructions on one of Matthew Setter blog articles.

sudo gem install kramdown-asciidoc

After this, I could convert a markdown file named 2020-03-10-calculating-pi-concurrently.md in a folder named posts with the following command:

kramdoc --format=GFM \
    --output=posts/2020-03-10-calculating-pi-concurrently.adoc \
    --wrap=ventilate \
    posts/2020-03-10-calculating-pi-concurrently.md

Editing & Visualising asciidoc files

For IntelliJ users, there's the AsciiDoc plugin.

For visualisation, run asciidoctor on your source to generate HTML5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment