mkdocs_nype.plugins.custom_redirects.plugin
Synopsis
MkDocs plugin made to replace the HTML template used in the redirects plugin.
This plugin was formerly a hook:
MIT License 2024 Kamil Krzyśków (HRY) for Nype (npe.cm)
HTML_TEMPLATE
HTML_TEMPLATE = '\n<!doctype html>\n<html>\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width,initial-scale=1" />\n <title>{{ config.site_name }}</title>\n <link rel="canonical" href="{url}" />\n <meta name="robots" content="index, follow">\n <noscript>\n <meta http-equiv="refresh" content="0;url={url}" />\n </noscript>\n <script>\n window.location.replace([\n "{url}",\n window.location.search,\n window.location.hash\n ].join(""))\n </script>\n </head>\n <body></body>\n</html>\n'
CustomRedirectsPlugin
Bases: BasePlugin[CustomRedirectsConfig]
write_html_wrapper
By default the redirect links are relative, which might not be so good for SEO