Gemini to HTML generator

hi, i was wondering if there are any reliable projects that i could use to convert my capsule with gemlogs into html with css automatically? i got a physical server and will be transfering my stuff onto it, so i decided to give a common web a try as well. as web is inferior to gemini and hand-editing it absolutely sucks, i'd prefer to still write my posts in gemtext for my capsule, and then pass them through some soft that either converts them once or acts as a proxy to web

the only hard requirements is for it to have some css so i could style it somehow

any recommendations?

Posted in: s/Gemini

🌲 byte

May 04 · 2 months ago

16 Comments ↓

🌻 Nexy · May 04 at 00:21:

I know it is posible because I seen it before pages made automaticaly from a gemini, but i can't remember the name of the program they use and also, can't find the blog who made the tutorial...

🐙 norayr · May 04 at 03:26:

i woud just use kineto to proxy content to http world. afaik it allows to specify custom css.

🚀 clseibold · May 04 at 08:23:

Oh, writing a gemini to html converter is very easy to do.

I'm sure there is some converter that is already available, but I don't know of any off the top of my head, aside from what the HTTP to Gemini proxies use. But just in case there isn't, I'll describe how it's done below very generally. As a sidenote, you don't need any special CSS classes to attach CSS to this stuff. Just use *tag selectors.*

All of the line types in Gemini have HTML equivalents (whereas the vice versa of course is not true). Parse your gemtext by line, and turn headings into

-

, blockquotes into
, links into (or

- links need to be block elements, but this can instead be handled in CSS if you want).

Then you just need to handle list items, which are slightly more complicated only because you need to wrap your entire list with