Front page missing hreflang links

Created on 31 October 2024, 15 days ago

Problem/Motivation

If you're using separate front pages, they don't have hreflang links indicating alternate languages are available (i.e. <link rel="alternate" hreflang="de" href="https://example.com/" />), which is important for SEO.

Steps to reproduce

1. View source on a site with a normal translated front page.
2. Observe that it has <link rel="alternate" hreflang"[langcode]" href="https://example.com/" /> for each language.
3. Set up separate front pages per language.
4. View source and observe each front page only has an hreflang link to itself.

Proposed resolution

Implement hook_page_attachments() to add the hreflang links.

User interface changes

None.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ksenzee Washington state

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024