Soupault 4.2.0: profile option for hooks, new command line options, and bug fixes
Soupault 4.2.0 is available for download from my own server and from GitHub releases. It adds a way to limit hooks to specific build profiles, introduces a few new command line options, and fixes a couple of bugs.
New features and improvements
Limiting hooks to build profiles
This is a new feature that borders on a bug fix. Page processing hooks were supposed to be configured almost like widgets so that people don’t need to learn two sets of options. In fact, internally, a lot of code is shared between widget and hook runners.
Still, I forgot one thing — support for limiting hooks to build profiles. You could specify that option, simply because you can specify any option in a widget or a hook (so that Lua plugins can definte their own options), but it wouldn’t have any effect. Well, now it does and works exactly like it does for widgets: if you specify
profile = "foo" in a hook, then it will only run if you run
soupault --profile live.
Note that you can specify more than one build profile, like
soupault --profile staging --profile debug.
There’s also a new log message for hooks or widgets that are ignored due to build profile options, so it’s now easier to see why a hook or a widget doesn’t run.
New command line options
--configoption for specifying custom config path without the use of environment variables.
--version-numberoption that prints just the version number (for easy use from scripts).
--config option is an alternative to the older way to specify a custom config path — the
SOUPAULT_CONFIG environment variable. That’s especially relevant on Windows, since mainstream Windows shells (cmd.exe and PowerShell) still don’t have a way to set an environment variable for a single command call.
--version-number option outputs the soupault version number (like “4.2.0”) without any additional information, so if you need just the number, you can get it without using
soupault --inithow takes
--build-diroptions into account when generating the config.
default_extensionoptions are now mentioned in configs generated by
- TOML type errors are now correctly handled and prefixed with an error message.
Trying to use a list for a boolean option behaves as expected now (
false, any non-empty list is true).