Soupault: A static website management tool

Soupault (soup-oh) is a static website generator/framework that works with HTML element trees and may well perhaps automatically manipulate them. It goes to even be described as a robotic webmaster that can edit HTML pages in conserving along with your principles, but doesn’t catch uninterested in making improvements to them.

You also can recount soupault for making blogs and utterly different forms of websites, interesting noteworthy delight in any utterly different SSGs (Jekyll, Hugo, Eleventy, and so forth.). On the opposite hand, you could well well presumably also additionally recount it as a submit-processor for existing websites — a recount case utterly different tools don’t strengthen.

Soupault is extremely-configurable, extensible, and designed to present you total control over your website technology path of.

Need to you are already accustomed to totally different static space mills, evaluate out the comparability with Hugo, Zola, and Jekyll. You also can additionally must read the FAQ.

Mercurial open up

Soupault is amazingly straight forward to set up: while you are on Linux (x86-64), macOS, or Microsoft Windows, you could well well presumably also staunch catch an executable.

Need to you are starting a weblog or a web based book, you could well well presumably also clutch a willing-to-recount blueprint.

Need to you would prefer to do a custom setup, read a info to catch a feel of soupault’s workflow:

  • Develop a weblog setup from scratch.

  • Use soupault as a submit-processor for an existing website.

Why soupault?

Soupault is now not delight in utterly different static space mills — it works on the HTML element tree stage. Most SSGs treat HTML as an opaque format that will also be generated with templates but can not be read or manipulated.

Soupault treats HTML as a prime-class format and that allows many recount cases and features which will possible be most now impossible for utterly different SSGs.

Store pages in any format

Soupault works with HTML element trees, so that you could well well presumably also store your pages in any format that will also be converted to HTML.

You also can configure HTML conversion commands for utterly different file extensions and soupault will name them automatically when it hundreds your pages.

No topic formats and tools you deserve to make recount of, you could well well presumably also without reveal assemble it. Must make recount of cmark for Markdown, pandoc for reStructuredText, and Asciidoctor for AsciiDoc? That’s straight forward:

[preprocessors]
  md = `cmark --unsafe --smart`
  rst = `pandoc -f rst -t html`
  adoc = `asciidoctor --embedded -o -`

Or you could well well presumably also write HTML pages by hand while you favor.

Speak any exterior tools to your workflow and take away needless client-aspect JavaScript

Reasonably hundreds of time americans add non-interactive client-aspect JavaScript to make amends for missing features of their SSGs. Soupault helps you retain your pages lighter by pre-rendering HTML with exterior tools at contain time as a substitute.

In essentially the most inspiring case, you could well well presumably also embrace the output of an exterior program to your web direct, in any space identifiable with a CSS selector.

[widgets.page-generation-date]
  widget = "exec"
  command = "date -R"
  selector = "datetime#generated-on"

However you could well well presumably also additionally pipe element direct through an exterior program and insert the output support. Lope code examples through your popular syntax highlighter, automatically evaluate within the event that they compile — there are hundreds of possibilities.

Here is how this website highlights source code in


and tags with Andre Simon’s highlight:

# Runs the content of <* class="language-*"> elements through a syntax highlighter
[widgets.highlight]
  widget = "preprocess_element"
  selector = '*[class^="language-"]'
  command = 'highlight -O html -f --syntax=$(echo $ATTR_CLASS | sed -e "s/language-//")'

With extra scripts you could well well presumably also assemble noteworthy extra, for instance, render math with KaTeX at contain time.

Extract web direct metadata from HTML, no front topic wanted

Most static space mills do you write metadata within the “front topic”, but soupault lets you extract it excellent from HTML as a substitute.

You also can outline a mapping of CSS selectors to metadata fields. Here is unassuming programs to add a checklist of all pages to your major web direct, the usage of essentially the major heading mark (both

,

, or

, whichever is recent) of the web direct as its title:

[index]
  index = true

[index.fields]
  title ={ selector =["h1", "h2", "h3"] }

[index.views.page-list]
  page = "index.html"
  index_selector = "main"

  index_template = '''
    <h2>All pagesh2>
    

Safe pleasure from HTML as a prime-class format

Soupault’s DOM manipulation is as mighty as client-aspect JavaScript (without interactivity, without a doubt), but the tip consequence is a static web direct.

With constructed-in features, you could well well presumably also automatically do two-manner footnotes, recount a extremely-configurable ToC, or add a URL prefix to every link. Most importantly, these features are readily available no topic the recent web direct format: whether or now not the HTML used to be hand-written or produced by a converter, they’ll work the identical.

With Lua plugins you could well well presumably also assemble noteworthy extra than that. You also can rework existing HTML, or do a DSL from “fake” parts and convert them to valid HTML, e.g. do a hyperlinked glossary.

The plugin API gives many possibilities, from including and deleting HTML parts to executing exterior programs, loading info from JSON/YAML/TOML, and extra.

Constructed to closing

Soupault is readily available as a statically-linked executable with no dependencies. You also can follow the identical version for years if it works for you. Or you could well well presumably also catch every new edition, are attempting it out, and without reveal revert support while you bustle into any issues.

Why it is named soupault?

Soupault is named after Philippe Soupault, a French dadaist and surrealist author, because it’s in conserving with the lambdasoup library.

Its construction is subsidized by the College of ’Pataphysics and the International Pastime Horsing Association.

Graphics

Soupault logo is a stick horse. It’s a reference to the meeting the build Philippe Soupault et al. selected a title for their lope by opening a dictionary at a random discover and landed on dada (n.), a colloquial for a stick horse, which is why they named it “dadaism”.

Need to you’re the usage of soupault to your space or must enhance awareness of it, be at liberty to position a button there.

Who’s on the support of it?

To this level staunch me, Daniil Baturin, but all americans is welcome to send a patch/pull expect or an provide. It has grown out of the bunch of advert hoc scripts that frail to energy my be pleased website, and then I believed I will as successfully do it usable for everybody who finds utterly different mills too annoying or too limiting.

Feel free to contact me.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like