STMA

AsciiDoc Support in HMVT

I’ve added basic support for AsciiDoc to the Hugo Minimum Viable Theme. This post shows some of the results.

AsciiDoc Admontions §

Here’s the source code…​

NOTE: This is a note.

TIP: Notes and tips in AsciiDoc result in ``<aside>``s in HTML.

IMPORTANT: The other admonitions in AsciiDoc result in ``<section>``s in HTML.

[CAUTION]
Why are different admonitions handled differently?
I don't know, you decide.

WARNING: I do not guarantee results if you do not use https://github.com/jirutka/asciidoctor-html5s[`asciidoctor-html5s`].

…​and here’s the result:

Important:

Important, caution, and warning admonitions in AsciiDoc result in <section>s in HTML, with named classes.

Caution:

Why are different admonitions handled differently? I don’t know, you decide.

Warning:

I do not guarantee results if you do not use asciidoctor-html5s.

Highlighted Source Code §

Note that you will need to bring your own syntax highlighting.

1
2
3
4
5
6
7
8
<div class="paragraph"><p>...</p></div>
<div class="paragraph"><p>...</p></div>
<div class="paragraph"><p>...</p></div>
<div class="listingblock"><div class="content">
    <pre class="...">
        <code class="..." data-lang="...">...</code>
    </pre>
</div></div>
if exists('did_load_filetypes')
  finish
endif
augroup filetypedetect
    autocmd! BufNewFile,BufRead *.ad setlocal filetype=asciidoc
augroup END

Quotes and Blocks §

Handled the same way they are for Markdown.

To Infinity, and Beyond!