Skip to content

Commit 90ef78e

Browse files
committed
Merge pull request #592 from omasanori/fix-rel-canonical
Do not strip trailing slash of canonical URLs.
2 parents e53b26a + f3c68bb commit 90ef78e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.themes/classic/source/_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<meta name="MobileOptimized" content="320">
1717
<meta name="viewport" content="width=device-width, initial-scale=1">
1818

19-
{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
19+
{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %}
2020
<link rel="canonical" href="{{ canonical }}">
2121
<link href="{{ root_url }}/favicon.png" rel="icon">
2222
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">

0 commit comments

Comments
 (0)