Perl script to convert a gemini site to html
Go to file
Alexander Lehmann fe38ebcb98 fix url 2023-03-18 19:53:11 +01:00
.gitignore inital version 2023-03-05 20:01:59 +01:00
LICENSE inital version 2023-03-05 20:01:59 +01:00
README.md fix url 2023-03-18 19:53:11 +01:00
gemini2html.pl skip cgi-bin dir 2023-03-18 19:43:19 +01:00
header.md inital version 2023-03-05 20:01:59 +01:00
styles.css inital version 2023-03-05 20:01:59 +01:00
template.html skip cgi-bin dir 2023-03-18 19:43:19 +01:00

README.md

gmisite2html

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.

https://tildegit.org/alexlehm/gmisite2html

alexlehm@gmail.com