Hello there,
I’m planning to migrate an existing website to Shopify. This website has typical localized URLs using “folders” like this:
/en/about-us
/fr/a-propos
that I’m planning to migrate to Shopify pages as:
/en/pages/about-us
/fr/pages/a-propos
After reading a lot of docs and forums, my question is: How do you handle navigation (click on links, menus, etc.) and hreflang tags using this kind of scheme? I could get all the fancy features but I couldn’t find anything on this simple SEO mapping between 2 pages.
I played a bit with liquid, created a few pages and prefixed them with a custom “locale” id as a page or article prefix (1 = en, 2 = fr) like:
/en/pages/1-about-us
/fr/pages/2-a-propos
/fr/pages/1-history
/fr/pages/2-histoire
and
-
used liquid tags (
containsandlocalization.language.iso_code) to filter links to display in the nav/footer, etc. -
used a JSON metafields to map the hreflang alternatives
It worked but this seems terribly hack-ish and high-maintenance to achieve this basic SEO setup.
Am I missing something? How does one tell Shopify that a “Page X” is equivalent to “Page Y” for the specified locale with each page having its own URL slug?
Cheers