fix(hreflang): Updating hreflang implemenation
Step 1: What is changing in this MR?
Most globalised URLs no longer contain the correct or are missing hreflang implementation since the CMS migration. These changes occurred October 19 - Nov 3, 2023
Common errors include:
- Self-referencing
hreflang
not present - thehreflang
implementation needs to specify both the preferred audience for the page itself, and its translated variants - Include non-region
hreflang
alternatives to target language speakers in multiple locations. For example German speakers in Switzerland. - Remove
data-hid="i18n-alt-de-de"
from the implementation. This must be formatted<link rel=”alternate” hreflang=”x” href=”https://example.com/alternate-page” />
with no additional code. - Ensure that previously broken hreflang urls are fixed for translated and untranslated pages
- Non-language examples with broken
hreflang
URLs previously
- https://about.gitlab.com/jobs/
- https://about.gitlab.com/events/
- https://about.gitlab.com/topics/ci-cd/
- https://about.gitlab.com/resources/
- https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/
- Language variants with previously broken
hreflang
URLs (fr
andde
):
- https://about.gitlab.com/fr-fr/free-trial/
- https://about.gitlab.com/de-de/solutions/continuous-integration/
- https://about.gitlab.com/de-de/
- https://about.gitlab.com/ja-jp/sales/
- https://about.gitlab.com/fr-fr/solutions/devops-platform/
Step 2: Ensure that your changes comply with the following, where applicable:
-
I, the Assignee, have run Axe tools on any updated pages, and fixed the relevant accessibility issues. -
These changes work on both Safari, Chrome, and Firefox. -
These changes have been reviewed for Visual Quality Assurance and Functional Quality Assurance on Mobile, Desktop, and Tablet. -
These changes work with our Google Analytics and SEO tools. -
These changes have been documented as expected.
Build Variables:
-
Use Contentful Preview API
Edited by Miracle Banks