gmi-web RC.1

2021-01-30

About a month ago I started a project I call gmi-web.

Initially this was simply a gmi.css file that made Gemini content that was rendered to HTML look pretty. It was in this pursuit that I realized, however, nobody really generates HTML from Gemini the same way. HTML is too ambiguous and the browsers really don't give a fuck what you send them, they make it work out most of the time if not looking a lil goofy, and that goofiness ends up instigating some semantic anti-patterns like wrapping <a> tags in a <div> to force "block" styling!

So against pretty much all my better judgement I set out to settle this ambiguity which culminated in a psuedo-formal guide on the best-practices for converting .gmi files to .html. I am determined to find the lowest common denominator between the two formats and now I need your help!

gmi-web

gmi-web(1) is a command-line utility that takes in .gmi files and converts them to .html following the suggested best-practices I have laid out in the repo. It currently powers the HTTP version of this capsule but I'm just one person, it would be ideal to have many people using this so as to have the best chance of ironing out the bugs I don't cause myself.

If you would like to give it a spin: First, thank you! Second, I'm sorry but you will need node and npm. This is a reference implementation and in the spirit of gmi-web, it uses web technologies:

npm install --global gmi-web-cli

Once installed you can checkout the man page for the full manual. Here's a taste of how it can be used to convert your capsule:

gmi-web --lang "en" $(find ~/your-capsule -name "*.gmi")
This will create .html files next to their .gmi counterparts on the filesystem, point nginx (or whevs) here and you should be live!

Feedback on your experience with the tool and suggestions for improvements are absolutely welcome however what I'm mostly interested in is feedback on gmi.css and the generated HTML, the primary goal is to establish some sort of semantic standard for all the gmi-to-html utilities to reference.

more entries talon.computer

more entries talon.computer