-
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
Redirect fails with translation plugin #33
Comments
I am with the same problem as the one reported here. I am using the |
Please provide a mkdocs website source (mkdocs.yml and necessary sources) that exhibits this issue. |
@oprypin working on that. |
@oprypin here they are: Steps to Reproduce
As @MAGICCC reported, this plugin ends up generating a Also, the page is not generated for the multiple supported languages or even for the language indicated on the redirects area, it just adds it to the root. |
I did a quickfix on my end some days after I created the issue. #/bin/bash
find ./site/ -maxdepth 2 -mindepth 2 -type f -name 'index.html' -not -path './site/de/*' -not -path './site/en/*' | while read f; do
echo "Fixing redirect '$f'..."
sed -i -E 's/\.en\/"/\/"/' $f
done And I am speaking about this repo, https://github.com/mailcow/mailcow-dockerized-docs |
It seems that #45 is taking us closer to a solution, but it's still really tough. Out of these two redirects, the 1st one will start working, but not 2nd: "en/old.md": "new.en.md"
"pt/old.md": "new.pt.md" Somehow the |
@oprypin I appreciate you looking into that. Thank you very much. |
The i18n plugin simulates the subsequent builds on the fly modifying the configuration to change the language of the theme and correctly save |
Just ran into this issue. Is there as solution/workaround to this? |
Hi @eXpl0it3r, Note that we're generating redirects based on Git with another hook, therefore we clear redirects_map between mkdocs serve runs, looking at the code now, I would make more changes to optimize it, but it worked last time I checked a few months back ✌️ |
Hello,
Now I want to use mkdocs-redirects to redirect from a old layout to a new docs layout including subfolders and translated pages using https://github.com/ultrabug/mkdocs-static-i18n
But I have a small problem:
Lets assume following redirection:
'old_foo.md': 'bar/foo.en.md'
Normally it should redirect to
bar/foo/
but it builds a redirection tobar/foo.en/
and this pages doesn't exist.Not sure if this can be fixed, since files can be named xx.en but maybe you guys have a solution for me.
The text was updated successfully, but these errors were encountered: