pslssg

Status
Active Development

About

pslssg stands for "Python Standard Library Static Site Generator" and is the tool that generates the website you are currently viewing. I originally created this tool to demonstate how powerful the Python standard library is.

The input format is XML and the output format is XHTML. I attempted to replicate many of the features that Jekyll has, including:

  • Pages, posts, and metadata
  • Templates with includes and inheritance
  • Variables, global config
  • Tag page generation

Another feature I think is interesting is that it uses a two pass process during rendering. First it compiles the post metadata into a sqlite database. Then, in the rendering phase, pages can query the database to generate lists. The tags inside of pslssg-iter generate tags with the tagname, and use Python string formatting to add query results to text or attributes. Here's an example from this page:


<pslssg-iter query="SELECT c.category, title, summary, date, slug, dst,
  permalink, year, month, day FROM posts INNER JOIN categories c ON c.post_id = id
  INNER JOIN tags t ON t.post_id = id WHERE c.category = 'blog' AND t.tag = 'pslssg'
  ORDER BY date DESC">
    <pslssg-iter-item _tag="a" _text="{1}" href="{6}" />
    <pslssg-iter-item _tag="small" _text="{8}.{9}.{7}" />
    <pslssg-iter-item _tag="p" _text="{2}" />
</pslssg-iter>
        

Blog Posts About this Project

An Introduction to pslssg 5.21.2025

pslssg is the "Python standard library static site generator" and is the program that builds the sauerTek website.