* 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
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
* Add heuristic checking for HTML anchors
Previously only anchors specified or generated in markdown could be
linked to, without complaint from the link checker. We now use a
simple heuristic check for `name` or `id` attributes.
Duplicate code has been refactored and all XML anchor checks updated
to use regex rather than substring match.
* Fix regexp and refactor
* Split checking for theme template off into separate function
Allows to check for fallbacks elsewhere in the code, without attempting to actually render the template.
* Add template fallback checking to taxonomy pages.
* Add template fallback checking to paginated taxonomies
Requires passing additional arguments to Paginator::from_taxonomy, which may not be desirable.
* Update documentation to reflect taxonomy template fallbacks.
* Update generic taxonomy template names.
* Make check_template_fallbacks() return &str.
* Add tests for check_template_fallbacks
* Next version
* Added tests for shortcode insertion
* Added TOC tests
* Added test for #1475 and #1355
* Basic internal / external links tests
* Added integration test
* Added pseudocode and started on logos
* Logos parsing for shortcodes
* Fixed string literal parsing
Moved string literal parsing to a new lexer in order to have greater
control of control characters which are parsed. This fixes the bug that
was present in the `string_from_quoted` function and also moves the
`QuoteType` to be in the `ArgValueToken`.
* Moved string literal logic to seperate module
* Added square bracket notation for variables
* Error handling rewritten
Remove the Result from the `fetch_shortcodes` function. Added proper
messages within the internal parsing.
* Reorganized and documented the shortcode submodule
* Added all logic for ShortcodeContext spans
* Added working insertion code for MD files
* Made functions generic over Markdown or HTML
* Add check for embedding bodies
* Structure of main function clear
* Added test for `new_with_transforms` function
* It runs!
* Added the code for handling p-ed html shortcodes
* Removed placeholders in markdown function
* Adjusted integration tests
* fetch_shortcodes now also returns a string
* Start of HTML insertion
* Kinda working everything
* Loading of shortcodes and builtins
* Fix tests
* Some missed fixes
* Tweaks + fmt
* Remove string literal handling
* Fix benches
* Grab shortcode def only once per site
* Fix benches
* Rewrite of parser
* Fix tests
* Add test for #1655
* Re-enable integration test
* Add test for #1601
* Add test for #1600
* Add test for #1500
* Add test for #1320
* Fix test on windows?
Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com>
* Pass lang to shortcodes context
* Add tests for lang in shortcodes
* Lang is passed to anchor-link.html template
* Document passing lang to shortcodes/anchor-link.html
Add a test to make sure lang can be overriden by passing an explicit argument to the shortcode,
for usage in the markdown filter where the language context is not available.
* Update docs for more information on shortcodes+i18n+markdown() filter
Co-authored-by: southerntofu <southerntofu@thunix.net>