Skip to content

Commit 77c5642

Browse files
committedSep 22, 2016
Allow images to be placed in other folders
- Remove `images/` only restriction and encourage placement in `assets/images/` instead
1 parent 4a26d61 commit 77c5642

7 files changed

+19
-19
lines changed
 

‎_includes/archive-single.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{% if teaser contains "://" %}
2121
"{{ teaser }}"
2222
{% else %}
23-
"{{ teaser | prepend: "/images/" | prepend: base_path }}"
23+
"{{ teaser | prepend: "/" | prepend: base_path }}"
2424
{% endif %}
2525
alt="">
2626
</div>

‎_includes/author-profile.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
<div class="author__avatar">
1010
{% if author.avatar contains "://" %}
11-
<img src="{{ author.avatar }}" alt="{{ author.name }}">
11+
<img src="{{ author.avatar | prepend: "/" }}" alt="{{ author.name }}">
1212
{% else %}
13-
<img src="{{ author.avatar | prepend: "/images/" | prepend: base_path }}" class="author__avatar" alt="{{ author.name }}">
13+
<img src="{{ author.avatar | prepend: "/" | prepend: base_path }}" class="author__avatar" alt="{{ author.name }}">
1414
{% endif %}
1515
</div>
1616

‎_includes/feature_row

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{% if f.url contains "://" %}
1414
{% capture f_url %}{{ f.url }}{% endcapture %}
1515
{% else %}
16-
{% capture f_url %}{{ f.url | prepend: base_path }}{% endcapture %}
16+
{% capture f_url %}{{ f.url | prepend: "/" | prepend: base_path }}{% endcapture %}
1717
{% endif %}
1818

1919
<div class="feature__item{% if include.type %}--{{ include.type }}{% endif %}">
@@ -24,7 +24,7 @@
2424
{% if f.image_path contains "://" %}
2525
"{{ f.image_path }}"
2626
{% else %}
27-
"{{ f.image_path | prepend: "/images/" | prepend: base_path }}"
27+
"{{ f.image_path | prepend: "/" | prepend: base_path }}"
2828
{% endif %}
2929
alt="{% if f.alt %}{{ f.alt }}{% endif %}">
3030
</div>

‎_includes/gallery

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
{% if img.url contains "://" %}
2222
"{{ img.url }}"
2323
{% else %}
24-
"{{ img.url | prepend: "/images/" | prepend: base_path }}"
24+
"{{ img.url | prepend: "/" | prepend: base_path }}"
2525
{% endif %}
2626
{% if img.title %}title="{{ img.title }}"{% endif %}
2727
>
2828
<img src=
2929
{% if img.image_path contains "://" %}
3030
"{{ img.image_path }}"
3131
{% else %}
32-
"{{ img.image_path | prepend: "/images/" | prepend: base_path }}"
32+
"{{ img.image_path | prepend: "/" | prepend: base_path }}"
3333
{% endif %}
3434
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
3535
</a>
@@ -38,7 +38,7 @@
3838
{% if img.image_path contains "://" %}
3939
"{{ img.image_path }}"
4040
{% else %}
41-
"{{ img.image_path | prepend: "/images/" | prepend: base_path }}"
41+
"{{ img.image_path | prepend: "/" | prepend: base_path }}"
4242
{% endif %}
4343
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
4444
{% endif %}

‎_includes/page__hero.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% if page.header.image contains "://" %}
44
{% capture img_path %}{{ page.header.image }}{% endcapture %}
55
{% else %}
6-
{% capture img_path %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endcapture %}
6+
{% capture img_path %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endcapture %}
77
{% endif %}
88

99
{% if page.header.cta_url contains "://" %}
@@ -15,7 +15,7 @@
1515
{% if page.header.overlay_image contains "://" %}
1616
{% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %}
1717
{% elsif page.header.overlay_image %}
18-
{% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/images/" | prepend: base_path }}{% endcapture %}
18+
{% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/" | prepend: base_path }}{% endcapture %}
1919
{% endif %}
2020

2121
{% if page.header.overlay_filter contains "rgba" %}

‎_includes/seo.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@
6060

6161
{% if page.header.image %}
6262
<meta name="twitter:card" content="summary_large_image">
63-
<meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
63+
<meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endif %}">
6464
{% else %}
6565
<meta name="twitter:card" content="summary">
6666
{% if page.header.teaser %}
67-
<meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/images/" | prepend: base_path }}{% endif %}">
67+
<meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | prepend: base_path }}{% endif %}">
6868
{% elsif site.og_image %}
69-
<meta name="twitter:image" content="{{ site.og_image | prepend: "/images/" | prepend: base_path }}">
69+
<meta name="twitter:image" content="{{ site.og_image | prepend: "/" | prepend: base_path }}">
7070
{% endif %}
7171
{% endif %}
7272

@@ -86,13 +86,13 @@
8686
{% endif %}
8787

8888
{% if page.header.image %}
89-
<meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
89+
<meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endif %}">
9090
{% elsif page.header.overlay_image %}
91-
<meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | prepend: "/images/" | prepend: base_path }}{% endif %}">
91+
<meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | prepend: "/" | prepend: base_path }}{% endif %}">
9292
{% elsif page.header.teaser %}
93-
<meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/images/" | prepend: base_path }}{% endif %}">
93+
<meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | prepend: base_path }}{% endif %}">
9494
{% elsif site.og_image %}
95-
<meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | prepend: "/images/" | prepend: base_path }}{% endif %}">
95+
<meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | prepend: "/" | prepend: base_path }}{% endif %}">
9696
{% endif %}
9797

9898
{% if page.date %}
@@ -113,7 +113,7 @@
113113
"@context": "http://schema.org",
114114
"@type": "Organization",
115115
"url": {{ seo_url | jsonify }},
116-
"logo": {{ site.og_image | prepend: "/images/" | prepend: base_path | jsonify }}
116+
"logo": {{ site.og_image | prepend: "/" | prepend: base_path | jsonify }}
117117
}
118118
</script>
119119
{% endif %}

‎_includes/sidebar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% if s.image contains "://" %}
1111
"{{ s.image }}"
1212
{% else %}
13-
"{{ s.image | prepend: "/images/" | prepend: base_path }}"
13+
"{{ s.image | prepend: "/" | prepend: base_path }}"
1414
{% endif %}
1515
alt="{% if s.image_alt %}{{ s.image_alt }}{% endif %}">
1616
{% endif %}

0 commit comments

Comments
 (0)
Please sign in to comment.