- Perl 97.3%
- Makefile 2.7%
| .gitignore | Added a Makefile with a README generator | |
| COPYING.md | Added COPYING | |
| jesgemini | Provide better feedback when the template renderer fails | |
| Makefile | Reference the local jesgemini in Makefile | |
| README.md | List BoringSSG as explicitly tested | |
jesgemini - just enough static site (capsule) generation for Gemini
jesgemini is a minimal static site (capsule) generator for the Gemini Protocol. It's designed to be "compatible" with sites built using other static site generators. Compatible here being a relative term, basically meaning it can slurp up a directory tree of markdown files meant for a web-SSG, and spit out a usable tree of gemtext.
It's not a goal to support advanced features of the large SSG's, but to support cross-publication of relatively simple sites to Gemini.
You should be able to cd into the root of a website that uses a static site
generator and then just run jesgemini to build a Gemini version.
jesgemini's capsule is at gemini://jesgemini.zerodogg.org, and also mirrored on the web at https://jesgemini.zerodogg.org.
Supported SSGs
jesgemini works for more SSG's than those listed here, but these have been
explicitly tested:
- eleventy/11ty
- hexo.io
- BoringSSG
Installation
There's no release available at this time. Clone the git repository directly:
git clone https://git.sr.ht/~zerodogg/jesgemini
Dependencies
Tools
jesgemini needs some external tools.
- required - lowdown - used to convert markdown to gemtext
Libraries
Note: the optional libraries are recommended, since without them you will get a degraded experience (ie. without liquid templates, without frontmatter etc.).
- required - The perl module
List::MoreUtils - required - The perl module
YAML::XS. Used to read frontmatter and hexo.io metadata - optional - The perl modules
Template::LiquidandTemplate::LiquidX::Tag::Include. Used to enable liquid template support. - optional - The perl module
Template. Used to enable template toolkit support.
To install all modules using cpanm run:
cpanm List::MoreUtils Template Template::Liquid Template::LiquidX::Tag::Include YAML::XS
If you don't have local perl modules set up, you may need to configure
local::lib. First install local::lib (it's probably packaged by your distro,
for instance for Debian it's packaged as liblocal-lib-perl). Then run:
eval $(perl -Mlocal::lib)
Then you can use the above cpanm command do install the modules and run
jesgemini. You may want to add the eval above (or its output) to your
.zshrc, .bashrc or similar.
Using liquid templates
If you have installed the required libraries (see above) jesgemini will run
your markdown-files through liquid. This should work like liquid usually does,
complete with support for includes. To allow you to add some conditional
blocks only present in gemini (or on the web), jesgemini sets some variables.
geminiis truejesgeminiis true
If you use the --run-liquid-filter* parameters (to filter a single file), then
jesgeminiStandalone is true.
Frontmatter
If you have installed the required libraries (see above) jesgemini will read
your frontmatter. This lets you customize the output for specific files. All
frontmatter settings are optional. The following settings can be set in your
frontmatter and will modify jesgemini's output:
geminiLinkMode, can be set toinline(equivalent tolowdown --gemini-link-inline),noref(equivalent tolowdown --gemini-link-end),reference(equivalent to justlowdown). The default depends, ifjesgeminithinks you're building a gemlog, then it isend, otherwise it isinline.geminiNoAutolink, a boolean, if set totruethen it will disablelowdown's autolink feature (equivalent tolowdown --parse-no-autolink). This lets you have literal gemtext links in your markdown and they won't be touched byjesgeminiwhen building your capsule.
License
gpgpwd is Copyright © Eskild Hustvedt 2025
gpgpwd is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
gpgpwd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.txt.