soupault

Static website generator based on HTML element tree rewriting

MIT License

Stars
363
Committers
8

Bot releases are visible (Hide)

soupault - 2.7.0 release

Published by dmbaturin over 3 years ago

Release announcement: https://soupault.app/blog/soupault-2.7.0-release/

New features

  • It's now possible to specify multiple build profiles, so that they work more like "build tags": e.g. soupault --profile staging --profile debug.
  • You can easily disable any widget in the config by adding disabled = true.
  • A new wrap widget allows wrapping specific HTML elements in an HTML snippet.

Improvements

  • The Processing widget ... log message only appears if the widget in question is actually going to run.
soupault - 2.6.0 release

Published by dmbaturin over 3 years ago

Release announcement: https://soupault.app/blog/soupault-2.6.0-release/

Improvements:

  • If an external process exits abnormally, its stdout and stderr are always logged as errors (for processes that succeed, it's only logged when debug = true, as before)
  • New option under the [index] section allows the user to choose entry sorting method: sort_type = <"calendar" | "lexicographic" | "numeric">. Additional strict_sort = <true|false> option allows failing the build if a value cannot be parsed as a date (in the "calendar" mode) or a number (in the "numeric" mode). The default mode is "calendar" to match the original behaviour. If strict_sort = false, soupault falls back to lexicographic comparison for invalid values and assumes that any valid value is greater than any invalid value.

Bug fixes:

  • Removed a dependency on the stringext library that is no longer necessary.
  • Fixed empty page output in a situation when the config has generator_mode = false and generator_mode = false, and the page lacks an <HTML> element (#27).
  • Malformed dates no longer cause soupault to crash due to incomplete exception handling.

Thanks for testing and suggestions to Anton Bachin (@aantron) and Javier Chávarri (@jchavarri) who now use soupault in the documentation workflows for Dream and Melange respectively.

soupault - 2.5.0 release

Published by dmbaturin over 3 years ago

Read https://www.soupault.app/blog/soupault-2.5.0-release for details.

Highlights:

  • New pretty_print_html option for those who need to preserve original whitespace (report by @lthms ).
  • New built-in widgets: relative_links and absolute_links for rewriting internal link targets (idea by @aantron ).
  • Soupault will no longer crash on Windows when an external program crash causes a broken pipe error.
  • --debug and settings.debug now automatically enable exception tracing.
  • Proper alignment of options in the --help output (thanks to @aantron).
soupault - 2.4.0 release

Published by dmbaturin almost 4 years ago

Read https://www.soupault.app/blog/soupault-2.4.0-release for details.

New features

  • The title widget will not touch the <title> element if it's not empty, if you set keep = true
  • force_indexing_path_regex option in the [index] table allows to re-classify some index page as normal pages (i.e. metadata sources, not index injection targets)
  • leaf_file option in the [index] table allows to mark a directory as a "hand-made clean URL", e.g. with leaf_file = ".leaf" any directory that contains a file named .leaf will no longer be treated as a site section, but its index.html will be treated as a normal page, and all files within it will be treated as assets.

New plugin functions

  • widget_config alias for config (since now there's the global soupault_config, a more specific alias may be a good idea)
  • build_dir and site_dir variables in the plugin environment (PR by @hristoast)
  • Table.get_key_default(table, key, default_value)
  • Type checking functions in the new Value module: is_int, is_float, ``is_string, is_table`, `is_list` (table with all integer keys), `is_nil`.
  • Sys.mkdir, Sys.get_file_modification_date

Bug fixes

  • include_subsection option in the [index] table works correctly now (used to cause a spurious option validation error)
  • soupault no longer outputs duplicate newlines on Windows (#19, reported by @wilt00).
  • The HTML.get_heading_level function now works with nodes returned by HTML.select (rather than just values created with HTML.create_element)

Notes

  • The new website address is www.soupault.app. A redirect from the old Neocities website will be maintained indefinitely, but you should update the URLs nonetheless.
soupault - 2.3.0 release

Published by dmbaturin almost 4 years ago

New features

  • The insert_html widget now supports parse = false, mainly for consistency with include and preprocess_element.

New plugin functions

  • String.base64_encode and String.base64_decode.
  • Sys.basename and Sys.dirname.
  • Sys.get_extension (e.g. "hello.jpg" → "jpg").
  • Sys.file_exists.
  • Sys.is_file and Sys.is_dir. Both return nil if it does not exist.
  • Sys.run_program_get_exit_code. Returns the exit code unlike Sys.run_program, 0 for success.
  • Sys.delete_file and Sys.delete_recursive

Improvements

  • TOML type errors now always include actual and expected types (e.g. "Expected a string but found a table").

Behaviour changes

Soupault now copies asset files to the target directory before processing pages. For example, if you have site/cats/index.html and site/cats/serious_cat.jpg, it will create build/cats/serious_cat.jpg first.

This is to enable plugins to manipulate asset files. Since plugins run when a page is processed, originally they couldn't do that because asset files wouldn't exist yet at their execution time.

Bug fixes

  • The profile option for widgets is working again. It's been broken between 2.0.0 and 2.3.0 because I forgot to add it to the list of valid options, so it broke when I made invalid widget options hard errors.

Misc

The macOS target is now named "macos-x86_64" to reflect the existence of the ARM64 macOS. If some hosted CI service adds macOS/ARM64 build hosts, I may add ARM64 binaries.

soupault - 2.2.0 release

Published by dmbaturin almost 4 years ago

https://soupault.neocities.org/blog/soupault-2.1.0-release/

Highlights:

  • Time-aware date format support.
  • Table.iter and other table helpers
  • Global config accessible to plugins and a new config section for custom options
  • Datetime functions for Lua plugins
soupault - 2.1.0 release

Published by dmbaturin almost 4 years ago

https://soupault.neocities.org/blog/soupault-2.1.0-release/

Highlights:

  • Win64 support.
  • Configurable content insertion actions.
  • Fallback selector support in inclusion widgets.
  • Configurable slugification options.
  • An option to keep the original doctype.
soupault - 1.13.0 release

Published by dmbaturin about 4 years ago

soupault - 2.0.0 release

Published by dmbaturin about 4 years ago

soupault - 1.4

Published by dmbaturin almost 5 years ago

You can download binaries from https://files.baturin.org/software/soupault/1.4/

Changes

  • New newest_entries_first option for [index] that sorts index data by date in descending order
  • New --debug/debug = true option and revamped verbose/debug output
  • New ignore_file_extensions option.
  • More illustrative default config.
soupault - 1.3.2 maintenance release

Published by dmbaturin about 5 years ago

Bug fixes

  • [Windows] Full support for running external scripts.
  • External scripts now output both stdout and stderr on errors, to account for scripts that don't honor the stderr convention.
soupault - 1.3.1 maintenance release

Published by dmbaturin about 5 years ago

Bug fixes

  • [Windows] Preprocessors and other external programs that are %PATH% now work as expected, no need to specify an absolute path
  • [preprocessors] section doesn't cause an erroneus "invalid config section" warning anymore
soupault - 1.3

Published by dmbaturin about 5 years ago

Improvements

  • [footnotes widget] New options link_id_prepend and back_link_id_append that allow you to create a separate "namespace" for footnote links.
  • [footnotes widget] More logical handling of ids: if a footnote element has an id, it's kept in place so that the footnote itself can be hotlinked using that id.
  • Invalid config options cause warning messages now, e.g. option "foo" is not valid for widget "title".
  • There's now spellchecking and suggestions for mistyped options, e.g. invalid option "backlinks", did you mean "back_links"?
  • AsciiDoc extension (.adoc) is now in the default page extensions list.
  • New Lua plugin functions for error reporting: Log.info, Log.warning, Log.error

Bug fixes

  • soupault --init generates correct page_file_extensions option in the default config now.
  • Incorrect config options no longer pass silently.
  • Useless "build directory doesn't exist" log message no longer appears when the build directory does exist.
  • Sample site config works properly with recent versions.

Build

  • ppx_monadic library was replaced with more actively maintained ocaml-monadic.
  • Soupault can be built with OCaml up to the latest 4.09.0.

Verifying release files

You can verify the releases using my GPG key and attached .asc signature files.

soupault - 1.2

Published by dmbaturin about 5 years ago

New features

Bug fixes

  • Better error reporting for circular and broken widget dependencies.
  • Correct error message for missing "html" option of the include_html widget.
soupault - 1.1

Published by dmbaturin about 5 years ago

New features

Back links in footnotes

Footnotes now include links back to the original location in the document for easier navigation.
It's possible to disable this and make footnote links one way with back_links = false widget option.

[widgets.footnotes]
  widget = "footnotes"
  # No back links
  back_links = false
  # ...

Path regex options for widgets

It's now possible to limit widgets to page file paths matching a Perl-compatible regex.

[widgets.starts-with-foo]
  path_regex = "/foo(.*)"
  widget = "insert_html"
  selector = "body"
  html = '<p>This page name starts with foo!</p>'

Excluding pages from widgets

It's now possible to explicitly exclude pages from a widget using these options:

  • exclude_page
  • exclude_section
  • exclude_path_regex

For example:

[widgets.toc]
  # No ToC on any page named "index"
  exclude_path_regex = '/index(\.*)'

Bug fixes

  • HTML tags inside headings are now preserved by the ToC widget and the auto-indexer.
  • Autoindex generator doesn't inadvertently remove nodes from the page anymore.

Platform support

Binaries for macOS are available.

soupault - 1.0.1

Published by dmbaturin over 5 years ago

Behaviour changes

Only files with extensions .htm .html .md .rst are assumed to be pages now, all other files are copied to the build dir unchanged. This is to simplify switching for existing websites that store assets together with pages, and to comply with the principle of least astonishment.

You can change it with page_file_extensions option, for example:

[settings]
  page_file_extensions = ["htm", "html", "md", "rst", "txt"]

New features

JSON index data export

It is now possible to export the global website index to file:

[index]
  index = true
  dump_json = "path/to/file.json"

Custom index fields

Example:

[index.custom_fields]
  tags = {selector = ".tag", select_all = true}
  category = {selector = "#category" }

Lists of selectors

page and section options can now be either single selector or lists.
This also applies to the selector option in title and footnotes widgets, with different semantics (select any that exists and select all respectively).

Bug fixes

  • Fixed missing dependency in the OPAM package spec.
  • Strict mode (--strict/strict = true) now actually stops on the first error.
  • Output lines are no longer prefixed with superfluous executable file name
  • Correct spelling of use_heading_text and use_heading_slug options. Old use_header_* options are kept for compatibility but deprecated.
  • A warning and a suggestion to use soupault --init are now displayed if neither site dir nor default template exist.
  • Graceful handling of sections (directories) without an index page or with no pages at all
soupault - 1.0-beta1

Published by dmbaturin over 5 years ago

The first beta. It's stable enough to build my own website with a pretty interesting config, but may still have rough edges.