-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow redirecting of .html URLs (without producing a warning) #51
Comments
@oprypin Any thoughts on this? |
Yeah this just needs to happen, even by default, I just haven't spent any time on this 😕 |
I'm happy to revisit my PR #50 to do this, would that help? |
We would also appreciate this fix! I see that this issue is a bit old, are there any new updates on this? We migrated from mdBook which has a similar issue. For example:
The redirect works, but the warning messages make it hard to spot other legitimate warnings |
I'll add that there's an easy workaround: plugins:
- redirects:
redirect_maps:
en/latest/example.html.md: example.md This will effectively create No MkDocs warning 🙂 |
(see also PR #50)
I would like to use
mkdocs-redirects
in our effort to port our documentation from Sphinx/.rst
(hosted atReadTheDocs
to MkDocs/.md
(hosted at GitHub Pages), so we can avoid breaking our current documentation URLs.This is actually working already, by using something like:
This makes a URL like
https://example.github.io/docs/en/latest/exampe.html
redirect correctly tohttps://example.github.io/docs/example/
.The problem is that
mkdocs-redirects
currently logs a warning for redirects of non-MarkDown paths:That's annoying, since we would like to use
mkdocs build --strict
in CI to test changes to our documentation, and that exits with a non-zero exit code as soon there as any warnings.Two potential ways forward:
.html
paths (since it works fine);.html
paths, through a configuration option likeallow_html_redirect
(implemented in add 'allow_html_redirect' configuration option to avoid printing warning when redirecting .html URLs #50);The text was updated successfully, but these errors were encountered: