- Some error messages refer to `get_taxonomy_term_by_name` instead of
`get_taxonomy_term`
- If a term cannot be found in a taxonomy, the error message
erroneously pretends that the taxonomy itself is unknown instead of
the term.
* Add feature to disable robots.txt and sitemap.xml from the config file.
Addresses feature request #2248
* Add documentation for no_sitemap & no_robots
* Rename no_robots and no_sitemap into generate_robots_txt and generate_sitemap (default to true)
* fix rustfmt issues
* Change documentation to show defaults
* Update documentation for the fields generate_sitemaps (resp. robots_txt), now that the default is true and false is needed to disable
* Refine YAML date regex
This commit does a few changes:
- Introduce a new regex
- it is a bit off-spec (it allows one-digit months and days in date-only mode)
- uses named groups
- avoids group duplication
- parses offset once
Fixes#2538
* Fix nanosecond parsing
* Rename variables for brewity
* Add tests
* Added support for multiple feeds
* Implemented backwards-compatibility for feed config
* Added a test for feed config backwards-compat, fixed bugs
- Fixed language config merge bug found by a test
- Adjusted two existing tests to fully check stuff related to multiple feeds
- Added a new test for backwards-compatibility of the changes
- Fixed bugs found by the newly added test
* Renamed MightBeSingle to SingleOrVec
* Made the multiple feeds config changes "loudly" backwards-incompatible
* added #[serde(deny_unknown_fields)] to front-matter, fixed problems this found in tests
* inital "just barely works" Fuse.js support
* implement FuseJavascript; refactor index_for_lang
* support search config
* move fuse index building to it's own file
* update doc of Search.index_format
* update config docs
* update search documentation
* use &str where possible
* use libs::serde_json
remmeber to commit Cargo.lock
* move extension logic to IndexFormat
* move the entire filename logic inside IndexFormat
* move elasticlunr to it's own module
* only create elasticlunr.min.js if we're actually using elasticlunr
* move ELASTICLUNR_JS to elasticlunr.js
* hide the details of search's submodules
* optionally include path
* explain include_path better
* remove references to stork
* replace if with match
* support include_description
* specify "permalink"
* move body cleaning and truncation to a function
* update truncate_content_length docs to specify *code points*
* Implemented bottom footnotes with backreferences
Fixes#1285
* Added bottom_footnotes option to configuration.md
* Renamed fix_github_style_footnotes()
* Added tests for convert_footnotes_to_github_style()
* Changed test to plain html instead of Vec<Event>
* Added integration test for footnotes
* Applied suggested changes
* Fix resizing for images with EXIF orientation
* Added test for asymmetric resize for exif images
---------
Co-authored-by: Tanishq <tanishq@levels.fyi>
The pulldown_cmark escaping functionality is now shipped in a separate
pulldown_cmark_escape crate
(https://crates.io/crates/pulldown-cmark-escape), starting with v0.10.0.
The markdown.rs module has to be adapted to a few API changes in
pulldown_cmark, and we have to introduce explicit handling of <img> alt
text to ensure it continues to be properly escaped.
There are also a few other behavior changes that are caught by the
tests, but these actually seem to be desired, so I've updated the insta
snapshot files for those tests to incorporate those changes.
Specifically, one footnote-parsing case seems to be handled better now,
and pulldown-cmark's `push_html` now doesn't escape quotes in text nodes
anymore (see https://github.com/pulldown-cmark/pulldown-cmark/pull/836).
* adding optional `lang` arugment to `get_section` global function
* Add handling of default language passed in `lang` argument of `get_section`
* Remove clones for path. Change "?" to an explicit check for error
* lint changes
* Clean up error handling for add_lang_to_path call
* fix format
* Add optional parameter "lang" to get_page template function. Add check for language available in config.
* Modify helper function name from calculate_path to get_path_with_lang. Modify documentation for get_section and get_page to include equivalent calls without using lang argument to demostrate how lang argument effects pathing.
* Remove ensure_directory_exists since it's identical to create_directory, and misleading
* Don't create directories unless needed; rely on create_dir_all instead of manually iterating over components
* Fixed "unnecessary mut" warning
* Fixed minor typo
* Use more than 8 threads for links checking if hardware supports it
* Fixed failing azure Linux check
* Avoid unnecessary HTTP requests to the same, already checked links
The warning about unknown highlight languages was displayed even when
code highlighting was disabled via `markdown.highlight_code = false`.
This commit adds a condition to check this setting before issuing the
warning, effectively suppressing it when code highlighting is disabled.
Issue: #2280
The `rel` and `type` HTML attributes are needed in the `base_url` (or
`section.permalink`) link so feed aggregators know that's the HTML page
that corresponds to the atom feed.
Note: The RSS template doesn't have this issue.
* templates:atom: add support for multiple authors
Atom 1.0 [0] support multiple `<author>` entries in the feed. This commit
modified the template to generate as many `<author>` as the page's
metadata contains.
[0] https://validator.w3.org/feed/docs/atom.html#recommendedEntryElements
* Test we can have multiple authors in ATOM feeds
* sort page.assets by filename
Uses .to_str() to sort files and subfolders.
The .unwrap() may need work or be replaced by unwrap_or_default(). Given
earlier checks in the function it should work however.
* add tests for assets sorting
* fix rustfmt
* use existing loop instead of windows
* also check the non-recursive test
* use .zip() and add assert msg