From abab7666223595565a664ad843b1655382166312 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Wed, 21 Sep 2016 22:15:17 -0400 Subject: [PATCH] Allow images to be placed in other folders - Remove `images/` only restriction and encourage placement in `assets/images/` instead --- _includes/archive-single.html | 2 +- _includes/author-profile.html | 4 ++-- _includes/feature_row | 4 ++-- _includes/gallery | 6 +++--- _includes/page__hero.html | 4 ++-- _includes/seo.html | 16 ++++++++-------- _includes/sidebar.html | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/_includes/archive-single.html b/_includes/archive-single.html index e904447..f7e3350 100644 --- a/_includes/archive-single.html +++ b/_includes/archive-single.html @@ -20,7 +20,7 @@ {% if teaser contains "://" %} "{{ teaser }}" {% else %} - "{{ teaser | prepend: "/images/" | prepend: base_path }}" + "{{ teaser | prepend: "/" | prepend: base_path }}" {% endif %} alt=""> diff --git a/_includes/author-profile.html b/_includes/author-profile.html index 510a1ba..548d7d7 100644 --- a/_includes/author-profile.html +++ b/_includes/author-profile.html @@ -8,9 +8,9 @@
{% if author.avatar contains "://" %} - {{ author.name }} + {{ author.name }} {% else %} - {{ author.name }} + {{ author.name }} {% endif %}
diff --git a/_includes/feature_row b/_includes/feature_row index b84f36b..0c6e319 100644 --- a/_includes/feature_row +++ b/_includes/feature_row @@ -13,7 +13,7 @@ {% if f.url contains "://" %} {% capture f_url %}{{ f.url }}{% endcapture %} {% else %} - {% capture f_url %}{{ f.url | prepend: base_path }}{% endcapture %} + {% capture f_url %}{{ f.url | prepend: "/" | prepend: base_path }}{% endcapture %} {% endif %}
@@ -24,7 +24,7 @@ {% if f.image_path contains "://" %} "{{ f.image_path }}" {% else %} - "{{ f.image_path | prepend: "/images/" | prepend: base_path }}" + "{{ f.image_path | prepend: "/" | prepend: base_path }}" {% endif %} alt="{% if f.alt %}{{ f.alt }}{% endif %}">
diff --git a/_includes/gallery b/_includes/gallery index 4d271ee..6c8e4b8 100644 --- a/_includes/gallery +++ b/_includes/gallery @@ -21,7 +21,7 @@ {% if img.url contains "://" %} "{{ img.url }}" {% else %} - "{{ img.url | prepend: "/images/" | prepend: base_path }}" + "{{ img.url | prepend: "/" | prepend: base_path }}" {% endif %} {% if img.title %}title="{{ img.title }}"{% endif %} > @@ -29,7 +29,7 @@ {% if img.image_path contains "://" %} "{{ img.image_path }}" {% else %} - "{{ img.image_path | prepend: "/images/" | prepend: base_path }}" + "{{ img.image_path | prepend: "/" | prepend: base_path }}" {% endif %} alt="{% if img.alt %}{{ img.alt }}{% endif %}"> @@ -38,7 +38,7 @@ {% if img.image_path contains "://" %} "{{ img.image_path }}" {% else %} - "{{ img.image_path | prepend: "/images/" | prepend: base_path }}" + "{{ img.image_path | prepend: "/" | prepend: base_path }}" {% endif %} alt="{% if img.alt %}{{ img.alt }}{% endif %}"> {% endif %} diff --git a/_includes/page__hero.html b/_includes/page__hero.html index cd0fa9f..6bfc571 100644 --- a/_includes/page__hero.html +++ b/_includes/page__hero.html @@ -3,7 +3,7 @@ {% if page.header.image contains "://" %} {% capture img_path %}{{ page.header.image }}{% endcapture %} {% else %} - {% capture img_path %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endcapture %} + {% capture img_path %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endcapture %} {% endif %} {% if page.header.cta_url contains "://" %} @@ -15,7 +15,7 @@ {% 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 | prepend: "/images/" | prepend: base_path }}{% endcapture %} + {% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/" | prepend: base_path }}{% endcapture %} {% endif %} {% if page.header.overlay_filter contains "rgba" %} diff --git a/_includes/seo.html b/_includes/seo.html index ccdd46b..301fbc9 100644 --- a/_includes/seo.html +++ b/_includes/seo.html @@ -60,13 +60,13 @@ {% if page.header.image %} - + {% else %} {% if page.header.teaser %} - + {% elsif site.og_image %} - + {% endif %} {% endif %} @@ -86,13 +86,13 @@ {% endif %} {% if page.header.image %} - + {% elsif page.header.overlay_image %} - + {% elsif page.header.teaser %} - + {% elsif site.og_image %} - + {% endif %} {% if page.date %} @@ -113,7 +113,7 @@ "@context": "http://schema.org", "@type": "Organization", "url": {{ seo_url | jsonify }}, - "logo": {{ site.og_image | prepend: "/images/" | prepend: base_path | jsonify }} + "logo": {{ site.og_image | prepend: "/" | prepend: base_path | jsonify }} } {% endif %} diff --git a/_includes/sidebar.html b/_includes/sidebar.html index b8ee39a..1bf8d62 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -10,7 +10,7 @@ {% if s.image contains "://" %} "{{ s.image }}" {% else %} - "{{ s.image | prepend: "/images/" | prepend: base_path }}" + "{{ s.image | prepend: "/" | prepend: base_path }}" {% endif %} alt="{% if s.image_alt %}{{ s.image_alt }}{% endif %}"> {% endif %} -- 2.43.0