Skip to content

Instantly share code, notes, and snippets.

@druttka
Created April 6, 2014 23:39
Show Gist options
  • Save druttka/10012638 to your computer and use it in GitHub Desktop.
Save druttka/10012638 to your computer and use it in GitHub Desktop.
{% capture canonical %}{% if page.canonical %}{{ page.canonical }}{% else %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endif %}{% endcapture %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment