A template and filter enabling pandoc to write gemini gemtext .gmi files.
typical command line
pandoc --template default.gmi -f html -t gmi.lua -o fileName.gmi fileName.html
default.gmi and gmi.lua are available here, pandoc is here
Read the manual for more detail.
This way to the gmi version.