Hey! I’m gonna start working on a plugin for Jekyll called jekyll-to-gemini that automatically generates a Gemini capsule from the Markdown that forms your website. This is so I can have a Gemini mirror of my blog for Cooler Dans to check out.
I would tell you about my plans for it, but I literally wrote all of them in the README, so imma just copy that into here lol.
I wanted to create a Gemini version of my Jekyll blog in order to show my support for the open, indie web. However, as far as I can tell, there currently is no plugin that provides that functionality. The closest thing is jekyll-gemtext, but that allows you to use Gemtext in place of Markdown for writing your pages and is more suited from making a Jekyll site out of an already existing Gemini capsule. I’m wanting the other way around: to automatically generate a Gemini capsule out of my Jekyll website.
So, I’m making it myself. With blackjack and hookers. Yeeee.
Gemtext has a few quirks that make converting an existing website to it a bit difficult. Luckily, there’s some ways we can work around that.
The most notable limitation is that Gemtext does not support inline links. Yup. You can’t do something like this in Gemtext. Instead, links have to go on their own separate line. The default solution will be to convert inline links into footnotes, like this:
The most notable limitation is that Gemtext does not support inline links. Yup. You can't do something like this in Gemtext. Instead, links have to go on their own separate line.
... (bottom of page) ...
=> http://picard.ytmnd.com/  like this
There will also be a few ways to customize how footnotes are generated, like where / how footnotes are placed, how much of the original text is included in the footnote for context, etc.
Images will be rendered as links with their alt text used as the display text. For example, an image like this:
Will be converted to Gemtext like this:
=> https://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/Jean-Luc_Picard_2.jpg/200px-Jean-Luc_Picard_2.jpg it's the funny bald man
Some Gemini clients allow for the rendering of images linked like this, so doing this lets Gemini clients that support that view the image like HTTP normies can.
In terms of other formatting, like italics, bold, etc, the Markdown syntax is generally left alone. Why? Y’all know that
*this* means this, so even if it doesn’t look like this, you’ll still know what it’s supposed to mean. Plus, the asterisks still perform their function of emphasizing a bit of text even if they don’t work like they were meant to. Life hack!
I’m going to be focusing on getting this to work on my own website first, which is a personal blog built on Jekyll 4.3.2 and a slightly modified version of Minima 2.5.1. If your website doesn’t fit that bill, it might not be the most ideal for now. Feel free to suggest improvements, tho!
Most notably in terms of compatability, this plugin parses the Markdown files used to build your website in order to generate the proper Gemtext. This obviously means that if you don’t use Markdown for your site, this isn’t gonna work. I don’t plan on supporting any alternative languages right now, but feel free to shout if you’re using something else. If enough people say they use X thing and they wanna be able to use this, I may add support for X thing to this plugin. Alternatively… fork this!
This plugin will use GPLv3 as its license. TL;DR: you can make any changes you want to this, but if you share your fork with others, you have to provide the source somewhere too. Part of me wants to do AGPLv3, but I don’t think everyone is crazy enough to publish their website’s source on the internet like me lol.
so yee! hopefully this goes somewhere. cyall l8r