hyper is already included in Zola due to the reqwest dependency (used
in the link_checker and templates components). Replacing Actix with
hyper in the serve command reduces the number of dependencies and
slightly improves build times and binary size.
Certain tests involving HTTP requests were sometimes hanging
indefinitely, so this uses Mockito for HTTP mocking. This seemingly
resolves the issue and makes these tests more reliable.
The existing can_fail_404_links test has been renamed to
can_fail_unresolved_links, to represent what actually occurs in the
test. The can_fail_404_links test now deals with a proper 404
response.
Just to be clear, the check_site test in the site component will
still create outgoing HTTP requests (due to the URLs used in the
test_site), so this commit only uses HTTP mocking where possible.
* maybe_slugify() only does simple sanitation if config.slugify is false
* slugify is disabled by default, turn on for backwards-compatibility
* First docs changes for optional slugification
* Remove # from slugs but not &
* Add/fix tests for utf8 slugs
* Fix test sites for i18n slugs
* fix templates tests for i18n slugs
* Rename slugify setting to slugify_paths
* Default slugify_paths
* Update documentation for slugify_paths
* quasi_slugify removes ?, /, # and newlines
* Remove forbidden NTFS chars in quasi_slugify()
* Slugification forbidden chars can be configured
* Remove trailing dot/space in quasi_slugify
* Fix NTFS path sanitation
* Revert configurable slugification charset
* Remove \r for windows newlines and \t tabulations in quasi_slugify()
* Update docs for output paths
* Replace slugify with slugify_paths
* Fix test
* Default to not slugifying
* Move slugs utils to utils crate
* Use slugify_paths for anchors as well
* Add anchor existant checking to link_checker component
* Oops, forgot some changes
* Drop scraper dependency and rework tests
* Handle name attributes
* actix_web::fs is now found in the actix-files crate.
* NotFoundHandler is now implemented using ErrorHandlers and the
path to 404.html is provided to the not_found() function using
actix_web::App::data. This setup allows for additional StatusCodes
to be handled in the future, if desired.
* Cleanly serving index.html files for requests to directories now
appears to be possible simply by using index_file("index.html") in
the static files service, so handle_directory() is removed.
* chore: Update glob to 0.3
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* chore: Update ws to 0.8
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Add check subcommand
* Add some brief documentation for the check subcommand
* Start working on parallel link checks
* Check all external links in Site
* Return *all* dead links in site