Soupault is an automated HTML editor rather than a just generator. It can parse HTML into an element tree, manipulate it and save to a file. Like DOM manipulation, but without a browser.
You can use it as a website generator and insert different content into a "template"—an empty page. However, it can also be a post-processor for a hand-written website or for output of another HTML generator.
Soupault is a single, static binary with no dependencies. Precompiled binaries are available for Linux, Windows, and macOS.
Soupault can pipe the content of HTML elements through external programs and read the output. You have options to replace the original element with that output or just add the output to the page.
For example, you can statically render equations with KaTeX, or do syntax highligting with any tool of your choice.
You can also set preprocessors for specific file extensions. For example, pipe
.md files through a Markdown
to HTML convertor of your choice before parsing and processing.
Soupault can extract metadata from pages using CSS3 selectors, in the spirit of microformats and web scraping libraries. You can create your own content model and tell soupault what to extract.
Then you can render the site index into HTML using built-in Jingoo template processor (syntax similar to Jinja2) or an external script. You can also export the site index to JSON for further processing.
Some things soupault can do out of the box:
This config snippet will insert the content of
includes/menu.html inside a
<div id="menu"> in every page that has that element,
[widgets.navigation-menu] widget = "include" file = "includes/menu.html" selector = "div#menu" exclude_page = ["404.html", "splash.html"]
Find more static site generators.