docs: Clarify relative_url and absolute_url filters (#8612)

Co-authored-by: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com>
Co-authored-by: Frank Taillandier <frank.taillandier@gmail.com>
This commit is contained in:
David Bruant 2021-03-26 15:07:15 +01:00 committed by GitHub
parent 69e9705512
commit 17beafeca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -18,8 +18,8 @@
#
- name: Relative URL
description: >-
Prepend the <code>baseurl</code> value to the input. Useful if
your site is hosted at a subpath rather than the root of the domain.
Prepend <code>baseurl</code> config value to the input to convert a URL path into a relative URL.
This is recommended for a site that is hosted on a subpath of a domain.
examples:
- input: '{{ "/assets/style.css" | relative_url }}'
output: '/my-baseurl/assets/style.css'
@ -27,7 +27,8 @@
#
- name: Absolute URL
description: Prepend the <code>url</code> and <code>baseurl</code> value to the input.
description: >-
Prepend <code>url</code> and <code>baseurl</code> values to the input to convert a URL path to an absolute URL.
examples:
- input: '{{ "/assets/style.css" | absolute_url }}'
output: 'http://example.com/my-baseurl/assets/style.css'