Skip to content

Commit d46e1da

Browse files
authored
Restore canonical link (#293)
WIth this change, a canonical link will be added to the head of every page, for example `<link rel="canonical" href="https://neo4j.com/docs/status-codes/2025.01/">`.
1 parent 5ca31cc commit d46e1da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/partials/head-info.hbs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
{{#unless (ne page.attributes.no-canonical undefined)}}
21
{{#if page.canonicalUrl}}
2+
{{#with page.canonicalUrl}}
33
<link rel="canonical" href="{{{this}}}">
4+
{{/with}}
45
{{else}}
56
<link rel="canonical" href="https://neo4j.com{{{ page.attributes.canonical-root }}}{{ page.url }}">
67
{{/if}}
7-
{{/unless}}
8+
89
{{#unless (eq page.attributes.pagination undefined)}}
910
{{#with page.previous}}
1011
<link rel="prev" href="{{{relativize ./url}}}">
@@ -13,6 +14,7 @@
1314
<link rel="next" href="{{{relativize ./url}}}">
1415
{{/with}}
1516
{{/unless}}
17+
1618
{{#with page.description}}
1719
<meta name="description" content="{{this}}">
1820
{{/with}}

0 commit comments

Comments
 (0)