|fe38ebcb98||2 weeks ago|
|.gitignore||4 weeks ago|
|LICENSE||4 weeks ago|
|README.md||2 weeks ago|
|gemini2html.pl||2 weeks ago|
|header.md||4 weeks ago|
|styles.css||4 weeks ago|
|template.html||2 weeks ago|
A small perl script to convert a gemini site to html to show it as a replacement when someone visits the site with http instead of gemini.
This is currently relying on both gemtext2md and pandoc. The first is available from https://github.com/mk270/gemtext2md and requires ocaml, the second is available from https://pandoc.org and requires Haskell (though when the program is installed as a system package it like does not have any runtime requirements)
The script takes the source dir and the target dir as arguments, e.g. I run it as
perl gemini2html.pl ~/gemini-site target
The script converts gmi files to html and puts a redirect file into place to preserve the .gmi links, all other files are copied as is.
The files header.md and template.html can be edited to change the surrounding html, currently this lists my site as target.
The script likely does not handle all cases correctly, it works for my site at http://gemini.lehmann.cx/ reasonabaly ok (but the site has only a few files)
I should say that the stylesheet comes from rawtext.club, my design capabilities are non-existent, that is why I like markdown and similar tools.