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

feat: prepare the launch of UK version of www.petplace.com #364

Open
51 of 57 tasks
ramboz opened this issue Jan 23, 2024 · 1 comment
Open
51 of 57 tasks

feat: prepare the launch of UK version of www.petplace.com #364

ramboz opened this issue Jan 23, 2024 · 1 comment
Assignees

Comments

@ramboz
Copy link
Collaborator

ramboz commented Jan 23, 2024

Use case

The customer wants to start a new website for the UK market based on their existing www.petplace.com.

The localized version should:

  • run on www.petplace.com/en-gb/
  • run a curated subset of the main content (customer will handle that part) from the /en-gb/ folder in Sharepoint
  • run a separate category index and search
  • run a separate sitemap
  • have separated SEO meta tags (canonical, hreflang, etc.)
  • have the same design as the main site
  • invite the user to browse the en-gb site when they are in the UK, and the regular site otherwise
  • have separated martech stack (deferred)

🚧 Technical

As part of this initiative, we'll cover:

  • content structuring in Sharepoint
  • code-level adjustments to support multiple geos and locales
  • martech customizations per geo
  • infra work to set up the new DNS and properly map to the en-gb sub-folder

🧑‍💻 Tasks

🧱 Header/footer and common fragments

  • Localize the generic fragments:
    • Create folders for each locale at the root in Sharepoint and copy over the /fragments folder
    • Introduce window.hlx.contentBasePath and set it to the active locale
      feat: support loading localized fragments #371
      • Update the header block to use the contentBasePath in the URL when fetching nav.docx and sidenav.docx
      • Update the footer block to use the contentBasePath in the URL when fetching footer.docx
      • Update the popular-articles block to use the contentBasePath in the URL when fetching popular-posts.docx
      • Update the popular-tags block to use the contentBasePath in the URL when fetching popular-tags.docx
      • Update the article-signup template and scripts.js to use the contentBasePath in the URL when fetching newsletter-footer.docx and newsletter-popup.docx
      • Update the searchresults template to use the locale in the URL when fetching 404.docx
  • Localize static strings:
  • Localize the 404 page
  • Localize the newsletter signup
  • Localize author pages
    feat: properly localize author pages #374
    • Copy over authors query index sheet and index page to the locale folder
    • Update the article-author template to use the contentbasePath

📰 Articles

📊 SEO

🤖 CI for search & XML feeds

  • .github/ci/build-search-index.js
    • feat: add support for localized search #397
    • Add support for a new locale argument
    • Set the argument based on the source document locale (i.e. path in sharepoint)
    • Create separate search index files for each locale
    • Adjust the search worker to load the right index for the current locale
    • Update the index only for the locale of the page that triggered the workflow
  • .github/ci/generate-news-feed.js
    • feat: build localized xml feeds #398
    • Add support for a new locale argument
    • Set the argument based on the source document locale (i.e. path in sharepoint)
    • Create separate XML feed files for each locale
    • Adjust the head.html to reference the feeds with the right locale
      <link rel="alternate" hreflang="en-US" type="application/rss+xml" href="https://www.petplace.com/rss.xml">
      <link rel="alternate" hreflang="en-US" type="application/atom+xml" href="https://www.petplace.com/atom.xml">
      <link rel="alternate" hreflang="en-GB" type="application/rss+xml" href="https://www.petplace.com/rss-en-gb.xml">
      <link rel="alternate" hreflang="en-GB" type="application/atom+xml" href="https://www.petplace.com/atom-en-gb.xml">
    • Update the feed only for the locale of the page that triggered the workflow

📝 Content Migration

petplace.com_-_post-migration_optimizations_and_additions.xlsx

  • copy breed pages
  • copy over selected article pages
  • create metatada.xlsx copy for primary language tag
  • copy over selected authors pages
  • copy over selected tags pages
  • copy over selected root pages

💰 Martech

📝 Authoring

  • restrict sharepoint write access for each authoring team, per locale
    • global authoring team can access everything
    • create a new group in sharepoint for the local team
    • local authoring team can only modify their content in /en-gb/

🌐 Infra

#395

  • We can leverage x-served-by headers to detect the Fastly pop location
  • Introduce geo service to detect where user is coming from: https://git.corp.adobe.com/experience-platform/franklin-delivery-cdn/issues/138
  • Introduce a popup with suggested redirection if ending on the wrong site (i.e. UK on petplace.com is asked if they want to go to petplace.co.uk, non-UK on petplace.com/en-gb/ is asked if they want to go to petplace.com)
    • Re-use the existing popup block
    • Popup should show 1 + n buttons, 1 for the current region (i.e. "Stay on …"), and then 1 for each other region available (only 1 for now, but should plan for an array down the road)

🚀 Go-live

@ramboz ramboz self-assigned this Jan 23, 2024
@ramboz ramboz changed the title feat: add multi-lingual support feat: prepare the launch of www.petplace.co.uk Jan 23, 2024
@ramboz ramboz changed the title feat: prepare the launch of www.petplace.co.uk feat: prepare the launch of UK version of www.petplace.com Jan 24, 2024
@ramboz
Copy link
Collaborator Author

ramboz commented Jan 29, 2024

❓ Open questions

  • Are author pages localized and should we filter the authors list per locale?
    • Answer: Yes, we are separating the UK authors from NA authors.
  • How should the newsletter signup be distinguished per region at the iterable.com level?
    • Answer: We are currently in the process of migrating data from Iterable to SFMC and will change the endpoint for the form in Feb.

ramboz added a commit that referenced this issue Jan 29, 2024
…nguage support (#365)

As part of #364, we need to extract all hardcoded strings so they can be
localized as needed. We also remove all the testing logic at the same
time since this isn't used anymore so we have a cleaner baseline for
future regional sites.

For this, a new `/placeholders.xslx` sheet has been added to Sharepoint,
and the site now pulls the static strings from there. We'll be able to
transparently replace the `placeholders.xslx` sheet for each locale down
the road so we have properly localized strings across the website.

We also introduce a new `getPlaceholder(key, options)` method in the
`scripts.js` so we can easily pull strings and quickly inject variables
in them (uses a `{{variableName}}` syntax)

Test URLs:
- Before: https://main--petplace--hlxsites.hlx.page/
- After:
  - https://placeholders--petplace--hlxsites.hlx.live/
  - https://placeholders--petplace--hlxsites.hlx.live/?martech=off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

No branches or pull requests

1 participant