* 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>
* Consider the site's output path in search_for_file
The search_for_file helper function now accepts an optional
output path. If passed, the file will also be searched there.
This is used in the get_url function to search in the
Site::output_path.
In practice, this means cachebust works for files in the
output path.
* Make output_dir required in search_for_file
* Update docs for file searching logic
* Add test for new file searching behavior
* cargo/manifests: allow user to use native-tls ...
... if `ring` can't be used on the user's platform (e.g. mips/ppc/riscv)
* CI: test for native tls build
* Add class based syntax higlighting + line numbers
* Use fork of syntect for now
* Fix tests
* Fix diff background on inline highlighter
Co-authored-by: evan-brass <evan-brass@protonmail.com>
* Add `num_format` filter for displaying formatted numbers
* Register the filter
* Update docs
* Make `locale` argument required
* Revert "Make `locale` argument required"
This reverts commit 9cdbf28591.
* Pull the default locale from the site config
* Add note about defaults to the docs
* Add missing borrow