From f3c68bb73f4763c52dbdfc9d958707e3816d0475 Mon Sep 17 00:00:00 2001 From: OGINO Masanori Date: Mon, 28 May 2012 17:21:26 +0900 Subject: Do not strip trailing slash of canonical URLs. Usually, links for posts are generated with a trailing slash, but canonical URLs aren't. Some services (e.g. http://b.hatena.ne.jp/) are confused with that behavior. We can fix it by removing canonical URLs, but then anyone may read a post with /index.html URL and post the URL to some tool or service. Therefore rel="canonical" seems useful IMHO. Signed-off-by: OGINO Masanori --- .themes/classic/source/_includes/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.themes/classic/source') diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index 0fdc4019..d7abd6fd 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -16,7 +16,7 @@ - {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} + {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %} -- cgit v1.2.1