Skip to main content

filters/absolute_url

Displays a URL in its absolute form based on the current site’s URL.

{{ post.url|absolute_url }}

Arguments

Takes no arguments

Description

Mostly all context URLs are relative, for example post.url. You can get an absolute version of a relative URL by using the absolute_url filter. The URL is built based on the site.url attribute from the global context. This makes it easy to get the absolute URL for populating share buttons and alike. If the input URL is already absolute then the filter has no effect.

Examples

Input

{{ page.url|absolute_url }}

Output

http://amazingcoffee.typed.com/about