Markdown into Micron

RNGit has a utility for converting markdown into micron and it works really well. Better still, I don’t have to maintain anything for it to work, I can just make use of the latest RNS library and I get it for free.

Here’s my Python to call it:

For dependencies: rns, ucwidth, pygments (last one is optional for syntax highlighting – don’t leave off ucwidth, despite that it’s technically optional).

Remaining idiosyncrasies

YAML headers

It seems oblivious to YAML headers. They just get dumped in wholesale, but the --- goes to the micron - before and after. I forget, is that pre-formatted text?

Because I’m piping my markdown through pandoc as a preprocessing step, the YAML header has already been stripped bbefore the content is processed with the markdown to mircon script. I apply a template to add the title from the YAML header to the page and I shift indent levels. So no big deal here for my stuff.

It doesn’t support reference links, but pandoc can help here – any invocation of pandoc with a markdown output type will strip reference links unless the options is explicitly passed to allow them.

Pandoc hangups

Pandoc will escape the # if it’s used in a link title. This can be fixed with a sed expression. If the sed expression is put in a Makefile, it gets a little tricker with the escaping, for example:

To accomplish this:

Would require something like the following:

Link targets are not touched by the conversion process, so any links that need to point at a micron page need to have the extension swapped. This is pretty much how all tools work, so I already had logic for swapping extensions that could be adapted.

Sed can help here.

In the Makefile example:

Tags: index, reticulum

Tags

#index

#reticulum

index

tags

prev ⏰

⏰ next

2026-05-08 - reticulum is a bit bumpy

created: 2026-05-17

(re)generated: 2026-05-22

page source

Proxied content from gemini://thatit.be/2026-05-17-12-19-31.gmi (external content)

Gemini request details:

Original URL
gemini://thatit.be/2026-05-17-12-19-31.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.