Created: Aug 25, 2022 | B quality | Mid importance

A Javascript library for rendering Markdown files in the Gemini .gmi format.

See it on Github or NPM.


Gemini is a recent text-based internet protocol that aims to be more robust than Gopher but more lightweight than the web, and doesn't seek to replace either. You need a special Gemini client to connect to "Gemini capsules" in "Gemspace" (such as gemini://

You can read more about Gemini on this digital garden.

Gemini capsules are authored using "Gemtext", which you can read the description of. For a list of many Gemini related projects and sites, see Awesome Gemini.

According to Wikipedia, Markdown is "a lightweight markup language for creating formatted text using a plain-text editor". Markdown is commonly used in Static Site Generators to store the source code for pages such as blog posts without making the author write full HTML markup.

Gemdown, then, is a library that takes Markdown input and outputs Gemtext. It is designed to be used in conjunction with a static site generator in order to create a Gemini mirror of an HTTP website (HTTP/Gemini mirrors of the same content is common amongst the Gemini community).

Relation to other libraries

The above is copied directly from the of gemdown on Github. I should admit that the library was heavily inspired by the Python library md2gemini, which actually got archived around the time that I was developing gemdown. I posted on Mastodon to thank the author for the inspiration, and he replied back, which was nice.

The gemdown library also uses marked as the main way of parsing Markdown. The marked library is written in Javascript (actually Typescript I think) and is extremely excellent. It is highly extensible which is what allowed me to create custom rules that output gemtext.

I created gemdown as a ESM module since marked is more easily imported that way.

What's next?

Given that I'm currently generating a Gemini version of this digital garden, and gemdown has all the features I need to do that, I might consider marking gemdown as "done" for now and releasing version 1.0.0. Of course, I'm not going to do that today since I already release a version today and I'd like to have more time for the library to "cook".


With an account on the Fediverse or Mastodon, you can respond to this post. Simply visit the post on its original server and leave your comment. It and other known non-private replies will be displayed below.

Learn how this is implemented here.