Skip to content

Commit

Permalink
fix: canonical of pages without permalink is the en version
Browse files Browse the repository at this point in the history
  • Loading branch information
KentarouTakeda committed Apr 7, 2024
1 parent 8eda952 commit 5320be2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion themes/navy/layout/partial/head.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Canonical links -->
<link rel="canonical" href="{{ page.permalink }}">
<link rel="canonical" href="{{ page.permalink | default(canonical_url('en'), true) }}">
<!-- Alternate links -->
{% if page.layout == 'page' or page.layout == 'index' %}
{% for lang, value in site.data.languages %}
Expand Down

0 comments on commit 5320be2

Please sign in to comment.