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:
parent
69e9705512
commit
17beafeca7
|
@ -18,8 +18,8 @@
|
||||||
#
|
#
|
||||||
- name: Relative URL
|
- name: Relative URL
|
||||||
description: >-
|
description: >-
|
||||||
Prepend the <code>baseurl</code> value to the input. Useful if
|
Prepend <code>baseurl</code> config value to the input to convert a URL path into a relative URL.
|
||||||
your site is hosted at a subpath rather than the root of the domain.
|
This is recommended for a site that is hosted on a subpath of a domain.
|
||||||
examples:
|
examples:
|
||||||
- input: '{{ "/assets/style.css" | relative_url }}'
|
- input: '{{ "/assets/style.css" | relative_url }}'
|
||||||
output: '/my-baseurl/assets/style.css'
|
output: '/my-baseurl/assets/style.css'
|
||||||
|
@ -27,7 +27,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Absolute URL
|
- 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:
|
examples:
|
||||||
- input: '{{ "/assets/style.css" | absolute_url }}'
|
- input: '{{ "/assets/style.css" | absolute_url }}'
|
||||||
output: 'http://example.com/my-baseurl/assets/style.css'
|
output: 'http://example.com/my-baseurl/assets/style.css'
|
||||||
|
|
Loading…
Reference in New Issue