Skip to content
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

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

Closed
wants to merge 1 commit into from
Closed

Conversation

hhslepicka
Copy link

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

@oprypin
Copy link
Contributor

oprypin commented Sep 3, 2022

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

@hhslepicka
Copy link
Author

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
Copy link
Author

@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 hhslepicka closed this May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redirect fails with translation plugin
2 participants