* Add `literal` as a new entry for `data source`, to be used by the `load_data` function
* Add tests to the module for plain text, json, xml, toml, and csv
* Update error messaging to include literal as a potential choice
* Update site documentation to include instructions for using `load_data` with a literal
* Make sure that zola serve/build can start from anywhere inside dir tree
* make clippy and rustfmt a bit happier
* replace unecessary if-else with unwrap_or and display which path could not get canonicalized if it fails at startup
* canonicalize config_path to avoid crash when config.toml changes
* Treat _index.LANG.md as section, not page (close#1694)
Display more advanced information in case of a future crash here
* Add link to translated local section in test_site_i18n to catch #1694
It appears linking to another translated page does not trigger the bug,
but linking to a section within the same (translated) page does.
* Allow (and test for) homepage internal links in broken link detection
Co-authored-by: southerntofu <southerntofu@thunix.net>
* Make ignored_content work with directories
Just had to remove strip_prefix(path) from file ignore code.
Added tests for subdirectory globbing.
* Add documentation
* add more tests
to confim that simple filename globs still match paths
without strip_prefix
This adds a path separator between the directory and filenames in the
message printed by `zola serve` to indicate it is listening for changes.
Before:
Listening for changes in /path/to/dir{config.toml, content, sass, static, templates}
After:
Listening for changes in /path/to/dir/{config.toml, content, sass, static, templates}
^
Currently, init_extra_syntaxtes_and_highlight_themes will supress
loading anything if highlight_theme is "css". This makes sense for the
highlight themes, but will also skip loading any extra syntax
definitions too.
This change defers the theme = css check, so we still load syntaxes in
this case.
Fixes: #1723
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
* templates/load_data: add an optional parameter headers ...
... now `load_data` function supports setting extra headers
* docs/templates/overview: cover some edge-cases in the explanation
* templates/load_data: fix caching logic with headers
* docs/templates: change wording for load_data headers explanations