|
3 months ago | |
---|---|---|
.gitignore | 8 months ago | |
LICENSE | 8 months ago | |
README.md | 3 months ago |
README.md
jekyll-to-gemini
Generates the proper Gemtext (for use in a Gemini capsule) out of your Jekyll website.
Notice: This is still a massive WIP and is currently non-functional.
Intro
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.
Formatting
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[1] in Gemtext. Instead, links have to go on their own separate line.
... (bottom of page) ...
# Footnotes
=> http://picard.ytmnd.com/ [1] 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!
Compatability
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!
This plugin will parse the HTML content of a page and convert it into Gemtext using a modified version of an already existing HTML to Gemtext converter (which one exactly is still on the table). This means that no matter what markup langauge you use to build out your site -- whether it be Markdown or something else -- it should work with this plugin.
License
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.