Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Artifact ID: | bd38b2d1620b6b0d7c7a5bdf53420a4dc2fdc82d0129611b50c1b84cfdd0a4d5 |
---|---|
Page Name: | Gemini Blastoff |
Date: | 2022-06-29 15:16:36 |
Original User: | steven |
Mimetype: | text/x-markdown |
Gemini Blastoff 2022-06-29
I now have a Gemini Capsule with a mirror of this blog! I got it working nicely on my main domain, so the URI is just gemini://rushsteve1.us
. My setup is pretty interesting so I figured I would do a write-up on how it works.
The Gemini server I use is The Unsinkable Molly Brown. I chose this one for a few reasons:
- It's by the same developer as the Gemini protocol itself
- It's in Go so the code is small and works great on ARM64
- It supports CGI scripts, which is important for reasons I'll get to
Overall I'm very happy with Molly Brown. Easy to setup, configure, and good performance so far. Though I've had some issues around CGI, but nothing dealbreaking.
I wanted my blog to be available on Gemini, but I didn't want to have to write everything twice (this blog uses Markdown, but Gemini uses Gemtext) and I wanted the two to always be in sync with each other. So I decided that the Gemini site should just pull the pages from the HTTP site, and serve those somehow.
This blog/wiki is hosted as a Fossil Repository, which means all pages are stored in an SQLite database. My first thought was to query this database, but I had some issues with this. Instead I realized that Fossil has a JSON API which has dedicated endpoints for the Wiki pages.
The big discovery was the fantastic Gemgen tool for converting Markdown to Gemtext. Also written in Go, so no extra dependencies!
The final piece of the puzzle was a CGI script I wrote in Ruby (a great language for CGI scripts in general) that pulls the wiki pages from the Fossil API, converts them from Markdown to Gemtext, then serves them as a Gemini response. I'm really happy with this setup. It's simple, reliable, and has TONS of room for tinkering and improvement.
If you're at all interested in hosting your blog on Gemini then I strongly suggest you give this a look. Most blog platforms have a simple API, and nearly everything uses Markdown these days, so with some tinkering you should be up and running in no time!