[ANN] md2gemini - a markdown to gemini converter

colecmac at protonmail.com colecmac at protonmail.com
Sun May 17 01:43:50 BST 2020


Evening Geminauts!

I've created another Gemini tool, they're lots of fun.
This one takes Markdown files and converts them into the Gemini
text format. I've heard some people mention something like this
on the mailing list before, and I wanted to make it, so hear you
go! Hope it can be used well.

My ideal usage was to allow for easy bi-hosting of blogs. Often
blogs are written in Markdown, and then transformed with tools
like Jekyll. md2gemini could transform those markdown files into
files ready to host on Gemini. It could even be part of a CGI script,
to convert files on the fly.

In my opinion, its "killer feature" is that it supports markdown tables,
converting them into Unicode or ASCII tables instead. It can also strip
Jekyll front matter [0] from files, which I hope will make bi-hosting with
Jekyll easier.

[0] https://jekyllrb.com/docs/front-matter/

Obviously markdown and gemini are not directly compatible. When things
in markdown don't apply to gemini, I just left them in plain text.
This applies to indented lists, block quotes, inline code, etc.
There was discussion earlier about footnote links, which is something I plan
to support, but for now this code just takes inline links and converts them
into gemini links, splitting up the paragraph.

It's available at https://github.com/makeworld-the-better-one/md2gemini
Let me know what you think!

makeworld


More information about the Gemini mailing list