1
0
Fork
You've already forked jesgemini
0
No description
  • Perl 97.3%
  • Makefile 2.7%
2025年09月28日 10:21:38 +02:00
.gitignore Added a Makefile with a README generator 2025年09月17日 19:26:19 +02:00
COPYING.md Added COPYING 2025年09月14日 16:29:17 +02:00
jesgemini Provide better feedback when the template renderer fails 2025年09月28日 10:21:38 +02:00
Makefile Reference the local jesgemini in Makefile 2025年09月17日 19:32:27 +02:00
README.md List BoringSSG as explicitly tested 2025年09月25日 21:52:11 +02:00

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:

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::Liquid and Template::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.

  • gemini is true
  • jesgemini is 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 to inline (equivalent to lowdown --gemini-link-inline), noref (equivalent to lowdown --gemini-link-end), reference (equivalent to just lowdown). The default depends, if jesgemini thinks you're building a gemlog, then it is end, otherwise it is inline.
  • geminiNoAutolink, a boolean, if set to true then it will disable lowdown's autolink feature (equivalent to lowdown --parse-no-autolink). This lets you have literal gemtext links in your markdown and they won't be touched by jesgemini when 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.