mkdocs-redirects icon indicating copy to clipboard operation
mkdocs-redirects copied to clipboard

Remove all suffixes from filename and make it compatible with i18n plugins.

Open hhslepicka opened this issue 3 years ago • 3 comments

Hi,

Thank you for this great plugin. This PR addresses the issue described at #33 in which the use of this plugin along with the i18n one causes the redirects to stop working due to how the files are named page.langcode.md instead of page.md.

Closes #33

hhslepicka avatar Sep 02 '22 23:09 hhslepicka

I'm afraid this idea cannot work. People could just name their files with dots in names, now they can't...

oprypin avatar Sep 03 '22 00:09 oprypin

Testing here I also realized another issue... The pages are not generated for every language so the redirection only really works for the main language.

In any case, I will put up a small project which can demonstrate this issue as you requested.

hhslepicka avatar Sep 03 '22 00:09 hhslepicka

@oprypin what about this idea here:

  • Add a new property to highlight that i18n is being used
  • If the file is a markdown file and after removing the .md it still has another .xxxx and the new property is true, remove the language suffix and create the file on the proper language directory.

If that would be a more acceptable solution I can work on that.

hhslepicka avatar Sep 03 '22 01:09 hhslepicka