Nicholas Dewberry

A casual blog.

Markdown works now

This post is written in Markdown instead of AsciiDoc. The build picks the converter from the file extension: .adoc and .asciidoc go through asciidoctor, .md and .markdown go through markdown-it.

Metadata lives in a front matter block at the top, between two --- lines. It uses the same keys as the AsciiDoc :type: and :tags: attributes, so tag pages and the home list treat both formats the same.

What it supports

Alone I go fast. Together, we go far.

def read_markdown(filepath):
    with open(filepath, encoding="utf-8") as f:
        attrs, body = split_front_matter(f.read())
    return attrs, parse_markdown_title(body), _markdown.render(body)
Extension Converter
.adoc asciidoctor
.md markdown-it

That’s it.

tech misc