Getting absolute url's in Jekyll

I wanted to add the canonical url to the site template, but using page.url only inserts the relative url.

You can use the absolute_url filter to fix that: {{ page.url | absolute_url }}