diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-09-17 09:40:14 -0500 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-09-17 09:40:32 -0500 |
commit | 728bdad5ca20de107e88a9cbd75757126a2b8bd5 (patch) | |
tree | 780320383ba747c7ac7aab108f85d67e49dc7f98 /.themes/classic | |
parent | 48cd2793cf40c634ccee89d5a155efdb6851201d (diff) | |
download | my_new_personal_website-728bdad5ca20de107e88a9cbd75757126a2b8bd5.tar.xz my_new_personal_website-728bdad5ca20de107e88a9cbd75757126a2b8bd5.zip |
removes index.html from canonical urls. closes #153
Diffstat (limited to '.themes/classic')
-rw-r--r-- | .themes/classic/source/_includes/head.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index d1741120..be371e92 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -18,8 +18,8 @@ {% if page.keywords %} <meta name="keywords" content="{{page.keywords}}"/> {% endif %} - - <link rel="canonical" href="{{ site.url }}{{ page.url }}"/> + {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %} + <link rel="canonical" href="{{ canonical }}"> <link href="{{ root_url }}/favicon.png" rel="shortcut icon" /> <link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> <script src="{{ root_url }}/javascripts/modernizr-2.0.js"></script> |