Scheme-based static site build tools for Gemini and the Web
Find a file
2025-08-23 22:15:08 -05:00
bin Web pipeline is now SCM->STE->STS->STX->XIPP; xhtml-specific post-processing can now more easily be done between STS and STX, and as such XIPP will be rewritten 2025-08-20 10:20:24 -05:00
demo Web pipeline is now SCM->STE->STS->STX->XIPP; xhtml-specific post-processing can now more easily be done between STS and STX, and as such XIPP will be rewritten 2025-08-20 10:20:24 -05:00
mod I made a predicate library so may as well use it on a function I despise ! 2025-08-23 22:15:08 -05:00
.gitignore A Makefile to install everything properly 2025-08-15 13:40:38 -05:00
LICENSE Has science gone too far? 2025-08-10 01:01:49 -05:00
Makefile A Makefile to install everything properly 2025-08-15 13:40:38 -05:00
README.md Add build/install instructions to the README 2025-08-15 18:57:52 -05:00

stxge

A trio of build tools for generating XHTML and GMI files from SGT-based* template files:

  • ste: Expand and evaluate template code (.scm -> .sxp)
  • stg: Render expanded SGT into Gemtext (.sxp -> .gmi)
  • stx: Render expanded SGT into XHTML (.sxp -> .xhtml)

Batteries are not included. All this tool does is expand and evaluate a template file, then compile it to either XHTML or GMI. Users are expected (and effectively required, in the case of advanced projects) to be comfortable with shell automation, as well as some sort of build system. Furthermore, prior knowledge of the Scheme language will prove useful, since template files are written in the Guile dialect of Scheme.

*SGT is the analogue to SXML for GMI documents

Basic Invocation

To build and install the tools, run:

$ make
$ make install

Then, the simplest invocation of these tools is something like:

$ template='`((h1 "Example!") (p "Hello :D"))'
$ echo "${template}" | ste | stg
$ echo "${template}" | ste | stx --title "Example!"

Demo Site

Check out demo/ for a more advanced example of how to use these tools.

  • site/ contains document templates to render
  • tmpl/ contains templates that can be included in pages
  • asst/ contains asset files (just a CSS file)
  • Makefile will automatically generate the site
  • eval/ will contain intermediary s-expression data from evaluating templates
  • dist/{www,gmi}/ will contain rendered XHTML and GemText documents, respectively

Simply run make to generate everything, then open the dist/www/index.xhtml and/or dist/gmi/index.gmi to see the results.