- <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.url }}">
- {% if page.rss or page.layout == 'post' %}<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.url }}" />{% endif %}
+ {% capture canonicalurl %}{{ page.url | replace:'index.html','' }}{% endcapture %}
+ <link rel="canonical" href="{{ canonicalurl | prepend: site.url }}">
+ {% if page.rss or page.layout == 'post' %}<link rel="alternate" type="application/rss+xml" title="{{ site.blog.title }}" href="/feed.xml" />{% endif %}