Static website generator based on HTML element tree rewriting
MIT License
Bot releases are hidden (Show)
Published by dmbaturin over 3 years ago
Release announcement: https://soupault.app/blog/soupault-2.7.0-release/
soupault --profile staging --profile debug
.disabled = true
.wrap
widget allows wrapping specific HTML elements in an HTML snippet.Processing widget ...
log message only appears if the widget in question is actually going to run.Published by dmbaturin over 3 years ago
Release announcement: https://soupault.app/blog/soupault-2.6.0-release/
Improvements:
debug = true
, as before)[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:
generator_mode = false
and generator_mode = false
, and the page lacks an <HTML>
element (#27).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.
Published by dmbaturin over 3 years ago
Read https://www.soupault.app/blog/soupault-2.5.0-release for details.
Highlights:
pretty_print_html
option for those who need to preserve original whitespace (report by @lthms ).relative_links
and absolute_links
for rewriting internal link targets (idea by @aantron ).--debug
and settings.debug
now automatically enable exception tracing.--help
output (thanks to @aantron).Published by dmbaturin almost 4 years ago
Read https://www.soupault.app/blog/soupault-2.4.0-release for details.
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.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)
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
include_subsection
option in the [index]
table works correctly now (used to cause a spurious option validation error)HTML.get_heading_level
function now works with nodes returned by HTML.select
(rather than just values created with HTML.create_element
)Published by dmbaturin almost 4 years ago
insert_html
widget now supports parse = false
, mainly for consistency with include
and preprocess_element
.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
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.
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.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.
Published by dmbaturin almost 4 years ago
https://soupault.neocities.org/blog/soupault-2.1.0-release/
Highlights:
Table.iter
and other table helpersPublished by dmbaturin almost 4 years ago
https://soupault.neocities.org/blog/soupault-2.1.0-release/
Highlights:
Published by dmbaturin about 4 years ago
Published by dmbaturin about 4 years ago
Published by dmbaturin almost 5 years ago
You can download binaries from https://files.baturin.org/software/soupault/1.4/
newest_entries_first
option for [index]
that sorts index data by date in descending order--debug
/debug = true
option and revamped verbose/debug outputignore_file_extensions
option.Published by dmbaturin about 5 years ago
Published by dmbaturin about 5 years ago
%PATH%
now work as expected, no need to specify an absolute path[preprocessors]
section doesn't cause an erroneus "invalid config section" warning anymorePublished by dmbaturin about 5 years ago
link_id_prepend
and back_link_id_append
that allow you to create a separate "namespace" for footnote links.option "foo" is not valid for widget "title"
.invalid option "backlinks", did you mean "back_links"?
.adoc
) is now in the default page extensions list.Log.info
, Log.warning
, Log.error
soupault --init
generates correct page_file_extensions
option in the default config now.You can verify the releases using my GPG key and attached .asc
signature files.
Published by dmbaturin about 5 years ago
include_html
widget.Published by dmbaturin about 5 years ago
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
# ...
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>'
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(\.*)'
Binaries for macOS are available.
Published by dmbaturin over 5 years ago
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"]
It is now possible to export the global website index to file:
[index]
index = true
dump_json = "path/to/file.json"
Example:
[index.custom_fields]
tags = {selector = ".tag", select_all = true}
category = {selector = "#category" }
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).
--strict
/strict = true
) now actually stops on the first error.use_heading_text
and use_heading_slug
options. Old use_header_*
options are kept for compatibility but deprecated.soupault --init
are now displayed if neither site dir nor default template exist.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.