Skip to content

Commit

Permalink
fix: alternate x-default language
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Mar 21, 2024
1 parent 12ab491 commit 71b80d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/layouts/partials/alternates-languages.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
{%- for alternate in page.translations ~%}
<link rel="alternate" hreflang="{{ alternate.language }}" href="{{ url(alternate, {canonical: true}) }}" />
{%- endfor ~%}
<link rel="alternate" hreflang="x-default" href="{{ url(page, {canonical: true}) }}" />
{#- default language ~#}
<link rel="alternate" hreflang="x-default" href="{{ url(page.path, {language: config.language, canonical: true}) }}" />
{%- endif -%}

0 comments on commit 71b80d0

Please sign in to comment.