From 8e027fced965bb4c0acde45b6cf9f8ecdcbbbba8 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 23 Sep 2016 14:22:57 -0700 Subject: [PATCH] Add documentation for relative_url and absolute_url --- site/_docs/templates.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/site/_docs/templates.md b/site/_docs/templates.md index 59bb4b18..48d7cd74 100644 --- a/site/_docs/templates.md +++ b/site/_docs/templates.md @@ -21,6 +21,34 @@ common tasks easier. + + +

Relative URL

+

Prepend the baseurl value to the input. Useful if your site is hosted at a subpath rather than the root of the domain.

+ + +

+ {% raw %}{{ "/assets/style.css" | relative_url }}{% endraw %} +

+

+ /my-baseurl/assets/style.css +

+ + + + +

Absolute URL

+

Prepend the url and baseurl value to the input.

+ + +

+ {% raw %}{{ "/assets/style.css" | absolute_url }}{% endraw %} +

+

+ http://example.com/my-baseurl/assets/style.css +

+ +

Date to XML Schema