Replace absolute_url with relative_url

Where it makes sense replace asset paths and navigation related paths with `relative_url` filter.

Leave SEO related `<head>` elements and social sharing links as `absolute_url`.

Fixes #1588
This commit is contained in:
Michael Rose
2018-03-20 11:35:36 -04:00
parent fbb7356d74
commit c8226a32a6
19 changed files with 49 additions and 37 deletions

View File

@@ -1,19 +1,19 @@
{% if page.header.image contains "://" %}
{% capture img_path %}{{ page.header.image }}{% endcapture %}
{% else %}
{% capture img_path %}{{ page.header.image | absolute_url }}{% endcapture %}
{% capture img_path %}{{ page.header.image | relative_url }}{% endcapture %}
{% endif %}
{% if page.header.cta_url contains "://" %}
{% capture cta_path %}{{ page.header.cta_url }}{% endcapture %}
{% else %}
{% capture cta_path %}{{ page.header.cta_url | absolute_url }}{% endcapture %}
{% capture cta_path %}{{ page.header.cta_url | relative_url }}{% endcapture %}
{% endif %}
{% if page.header.overlay_image contains "://" %}
{% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %}
{% elsif page.header.overlay_image %}
{% capture overlay_img_path %}{{ page.header.overlay_image | absolute_url }}{% endcapture %}
{% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %}
{% endif %}
{% if page.header.overlay_filter contains "rgba" %}