Without the hint a search engine sees two independent pages with similar content. With hreflang it
sees two versions of one page and shows each searcher the one in their language.
<link rel="alternate" hreflang="de-DE" href="https://example.org/de/notizen/kaffee" />
<link rel="alternate" hreflang="en-US" href="https://example.org/en/notes/coffee" />
<link rel="alternate" hreflang="x-default" href="https://example.org/en/notes/coffee" />options:
seo:
hreflang: true # default
xDefault: defaultNo
baseUrl, nohreflangThe declaration requires absolute addresses. With no
baseUrlin the Quartz configuration the plugin leaves the lines out — it has nothing to build them from. That is the most common reason they are missing.
x-default
Says which version should apply when no language fits.
| Value | Meaning |
|---|---|
default | the site’s default language (default) |
none | no declaration |
| a language code | exactly that language |
For a site whose English version is the more complete one, xDefault: en makes sense even when the
default language is German.
What gets linked
Only pages that have a link (chapter 3) and that survived the build. With the folder and suffix conventions the plugin can derive the partners from the slugs if the grouping found nothing.
A page without translations gets no hreflang lines — there is nothing to link.