Skip to content

Releases: PataphysicalSociety/soupault

4.11.0 release

07 Sep 18:46
Compare
Choose a tag to compare

Release post: https://soupault.app/blog/soupault-4.11.0-release/

New features

  • It's now possible to use :has() selector in options that accept CSS selectors (implemented in lambdasoup 1.1.0)

New plugin API functions

  • HTML.is_text(e) — checks if an HTML element tree node is a text node. Thanks to @jbhoot!

Bug fixes

  • HTML.is_document(e) now correctly returns true for values created with HTML.parse() and HTML.create_document().
  • Namespaces are now correctly preserved in HTML element attribute names (implemented in lambdasoup 1.1.1).

4.10.0 release

22 Apr 09:12
Compare
Choose a tag to compare

Release blog post: https://soupault.app/blog/soupault-4.10.0-release/

New features

Deleting only elements that do not have certain children

The delete_element widget has a new option: when_no_child.

For example, suppose you have footnotes container in your template that looks like this:
<div id="footnotes"> <hr class="footnotes-separator"> </div>. If a page has footnotes,
it would contain something like <p class="footnote">.... If not, it would only have the <hr> element in it.

Deleting it from pages that don't have any footnotes cannot be done with only_if_empty
because the container has that auxilliary element in it.

However, with the new option you can make the widget delete the container
only if nothing inside it matches the selector of actual footnotes.

[widgets.clean-up-footnote-containers]
  after = "footnotes"
  widget = "delete_element"
  selector = "div#footnotes"
  when_no_child = "p.footnote"

Bug fixes

  • Complete HTML pages work correctly in generator mode again (report by Auguste Baum)
  • Config files with multiline strings and Windows newlines (CRLF) no longer cause parse errors
    (report by Bohdan Kolesnikov)
  • Configs that consist of a single comment line followed by EOF no longer cause parse errors
    (found thanks to the TOML test suite v1.4.0)

4.9.0

20 Mar 12:06
Compare
Choose a tag to compare

Release blog post: https://soupault.app/blog/soupault-4.9.0-release

New features and improvements

  • New startup hook that runs before soupault processes any pages and can modify the global_data variable.

New plugin API functions

New Digest module offers functions for calculating cryptographic hash sums of strings.
All those functions return hex digests.

  • Digest.md5(str)
  • Digest.sha1(str)
  • Digest.sha256(str)
  • Digest.sha512(str)
  • Digest.blake2s(str)
  • Digest.blake2b(str)

Other new functions:

  • Sys.basename_url(str) and Sys.dirname_url(str) — aliases for Sys.basename_unix and Sys.dirname_unix, respectively.

4.8.0 release

01 Feb 11:26
Compare
Choose a tag to compare

Full announcement: https://soupault.app/blog/soupault-4.8.0-release (includes important information about future plans)

4.8.0 (2024-01-12)

New features and improvements

  • site_index variable is now available to the post-build hook.
  • index_entry variable (the complete site index entry for the current page) is now available to post-index, save and post-save hooks and to Lua index processors.
  • New options for ignoring certain paths in the sire dir: settings.ignore_path_regexes and settings.ignore_directories.

New plugin API functions

  • HTML.inner_text() — returns the text nodes from inside a node, stripped of all HTML tags.

Bug fixes

  • In generator mode, page files are parsed as HTML fragments so <style> tags and similar no longer call issues
    with duplicate <body> tag inserted in the page (#58, report by Delan Azabani).

4.7.0 release

19 Sep 16:54
Compare
Choose a tag to compare

Release blog post: https://soupault.app/blog/soupault-4.7.0-release

New features and improvements

  • New max_items option in index views allows limiting the number of displayed items.
  • New settings.page_character_encoding option for correctly loading pages in encodings other than ASCII and UTF-8.
  • New post-build hook that runs when all pages are processed and soupault is about to terminate.
  • Info logs to indicate the first and second passes in the index_first = true mode.
  • Debug logs now tell why a page is included or excluded from an index view: "page_included checks for %s: regex=%b, page=%b, section=%b"

New plugin API functions

  • CSV.from_string(str) — parses CSV data and returns it as a list (i.e., an int-indexed table) of lists.
  • CSV.unsafe_from_string(str) — like CSV.from_string but returns nil on errors instead or raising an exception.
  • CSV.to_list_of_tables(csv_data) — converts CSV data with a header returned by CSV.from_string into a list of string-indexed tables for easy rendering.
  • HTML.swap(l, r) — swaps two elements in an element tree.
  • HTML.wrap(node, elem) — wraps node in elem.
  • New global_data hash table for sharing data between plugins.
  • New soupault_pass plugin environment variable (0 when index_first = false, 1 and 2 for the first and the second pass respectively when it's true).

Bug fixes

  • Fixed an unhandled exception on index entry sorting failures when sort_strict = true and sort_by is unspecified.
  • Fixed a typo in the comments of the config generated by soupault --init (s/ULRs/URLs/).

Misc

New state record now holds both the settings record and the TOML config datastructure,
plus the new global_data and soupault_pass variables, and can be easily extended to support global state new variables.

Official binaries are now available for Linux on ARM64.

4.6.0 release

17 Jun 13:26
Compare
Choose a tag to compare

Release post: https://soupault.app/blog/soupault-4.6.0-release/

New features and improvements

New plugin API functions

  • Sys.getenv(name, default_value) function (default_value is optional).
  • String.ends_with(string, suffix).
  • String.is_valid_utf8(string) and String.is_valid_ascii(string) functions.
  • Table.length(table) — returns the number of items in a table.
  • Table.for_all(func, table) — checks if boolean function func is true for all items in a table.
  • Table.for_any(func, table) — checks if boolean function func is true for at least one item in a table.
  • Table.is_empty(t) — returns true if t has no items in it.
  • Table.copy(t) — returns a copy of the table t.
  • HTML.is_empty(e) — returns true if e has zero child nodes.
  • HTML.is_root(e) — returns true if e has no parent node.
  • HTML.is_document(e) — returns true if e is a soup (document) node rather than an element or a text.
  • Value.is_html(v) — returns true is v is an HTML document or node.

Bug fixes

  • Fixed an unhandled OTOML exception when loading configs with duplicate key names (such issues generate proper parse errors now).

4.5.0 release

18 Apr 22:30
Compare
Choose a tag to compare

Full announcement: https://soupault.app/blog/soupault-4.5.0-release

New features and improvements

  • --no-caching option allows the user to disable caching even if settings.caching is true in the config.
  • [Plugin API] New HTML.prepend_root(node, child) function for inserting new nodes in HTML documents before all existing nodes.
  • The name of the Lua index processor file and the index view that calls it are displayed in the logs now.
  • Clearer breadcrumb template parse error message (mentions Jingoo now).

Bug fixes

  • soupault --version correctly prints a trailing newline again.

4.4.0 release

04 Feb 10:21
Compare
Choose a tag to compare

New features

Support for caching the output of page preprocessors and commands used by preprocess_element widgets.

[settings]
  # Caching is off by default so you need to enable it
  caching = true

  # Change the cache directory name if you wish
  cache_dir = ".soupault-cache"

You can force soupault to clear the cache and rebuild everything by running soupault --force.

4.3.1 maintenance release

22 Nov 23:16
Compare
Choose a tag to compare

Bug fixes

  • The relative_links widget now handles links to pages and files at the same level correctly and adds ./ to them.
  • The relative_links widget now always prepends ./ to links at the same level or deeper to make the output deterministic.

4.3.0 release

24 Oct 22:18
Compare
Choose a tag to compare

4.3.0

New features and improvements

New Lua plugin functions

  • String.starts_with(str, prefix)
  • Sys.split_path(path_str) for splitting native file paths (uses / on UNIX-like systems, \ on Windows).
  • Sys.split_path_unit (aks Sys.split_path_url) for splitting paths using the /-convention regardless of the OS (safe for URLs).

Bug fixes

  • --help message about the --config option now correctly mentions that it takes a path.
  • Removed a useless log message about build profiles when no profiles are specified (i.e., --profile option is not given).
  • Improved error reporting in certain unlikely situations (mainly internal errors).
  • When index entry comparison failure fails due to bad field values, offending entries are logged in JSON to simplify debugging.
  • Corrected a mistake in option spell checking logic that could sometimes lead to useless suggestions.