Collection of filters for urls.
Add rel="nofollow" target="_blank"
to all external links
Replace anchor links like <a href="#element-on-page">
with canonical versions, eg: https://example.com/page#element-on-page
Special fixes for Yandex.Turbo, because their parsers raise warnings:
- Remove navbars
<nav>
elements - Remove anchor links like
<a href="#element-on-page">
(toAbsoluteUrls
will not help here, because Yandex will mark absolute url with anchor link as warning) - Remove table of contents, because it uses anchor links
Canonicalize URL
Examples:
wiki/some-guide/index.html
=>https://example.com/wiki/some-guide
wiki/some-guide/subguide.html
=>https://example.com/wiki/some-guide/subguide
amp/wiki/some-guide/subguide.html
=>https://example.com/wiki/some-guide/subguide