-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for matchers and required language #32
Conversation
Has conflicts b/c the 2nd commit conflicts with v0.14.16 from today, which contains the same changes. I accidentally removed that while troubleshooting another issue today and then re-added it. |
bff9740
to
76f0a29
Compare
I've dropped that commit, it should be mergeable now! |
Happy to see this PR being used instead of mine 👍 Thanks @JadedBlueEyes! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to review this more, but wanted to leave current comments.
What is the goal for how the root path is handled, when the lang param is required?
I.e. Is a dev expected to redirect the root path to one of their preferred required lang paths--e.g. /de
? Or does /
show duplicate content as one of the /[lang]
routes? If so, should one of the href lang's point to the root path instead of its /[lang]
? I assume the root path would be considered canonical for that language, correct? I'd be interested to learn what is best practice for SEO in such a situation.
It'd be nice if this had a test at a higher level, to realistically test the actual output if you have ideas on that
The developer should be expected to redirect to a language. The redirect language should be based off of In my PR, root as in |
Signed-off-by: Jade Ellis <jade@ellis.link>
Signed-off-by: Jade Ellis <jade@ellis.link>
76f0a29
to
0bba8bf
Compare
Thanks @Epoxide, that makes sense. |
* edit: My mistake, GitHub just moved the annotation |
Co-authored-by: Jason <50032291+jasongitmail@users.noreply.github.com>
Thanks for the updates @JadedBlueEyes! |
@JadedBlueEyes @Epoxide I'll push a version bump to NPM either later tonight or tomorrow. Going to update the readme tonight and look it over to see if any more testing would be useful. |
@JadedBlueEyes @Epoxide v0.14.17 is on NPM. Thanks for working on this! |
This implements a similar feature to #29, and it also allows using route matchers - for example
[lang=langcode]
, with the correct file in theparams
folder. This should also allow [[lang]] to be at more places than just the beginning of the path.I've added tests for the required lang parameter.