Allow images to be placed in other folders
- Remove `images/` only restriction and encourage placement in `assets/images/` instead
This commit is contained in:
parent
4a26d61008
commit
77c5642803
7 changed files with 19 additions and 19 deletions
|
@ -20,7 +20,7 @@
|
|||
{% if teaser contains "://" %}
|
||||
"{{ teaser }}"
|
||||
{% else %}
|
||||
"{{ teaser | prepend: "/images/" | prepend: base_path }}"
|
||||
"{{ teaser | prepend: "/" | prepend: base_path }}"
|
||||
{% endif %}
|
||||
alt="">
|
||||
</div>
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
<div class="author__avatar">
|
||||
{% if author.avatar contains "://" %}
|
||||
<img src="{{ author.avatar }}" alt="{{ author.name }}">
|
||||
<img src="{{ author.avatar | prepend: "/" }}" alt="{{ author.name }}">
|
||||
{% else %}
|
||||
<img src="{{ author.avatar | prepend: "/images/" | prepend: base_path }}" class="author__avatar" alt="{{ author.name }}">
|
||||
<img src="{{ author.avatar | prepend: "/" | prepend: base_path }}" class="author__avatar" alt="{{ author.name }}">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
||||
<div class="feature__item{% if include.type %}--{{ include.type }}{% 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 %}">
|
||||
</div>
|
||||
|
|
|
@ -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 %}">
|
||||
</a>
|
||||
|
@ -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 %}
|
||||
|
|
|
@ -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" %}
|
||||
|
|
|
@ -60,13 +60,13 @@
|
|||
|
||||
{% if page.header.image %}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
|
||||
<meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endif %}">
|
||||
{% else %}
|
||||
<meta name="twitter:card" content="summary">
|
||||
{% if page.header.teaser %}
|
||||
<meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/images/" | prepend: base_path }}{% endif %}">
|
||||
<meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | prepend: base_path }}{% endif %}">
|
||||
{% elsif site.og_image %}
|
||||
<meta name="twitter:image" content="{{ site.og_image | prepend: "/images/" | prepend: base_path }}">
|
||||
<meta name="twitter:image" content="{{ site.og_image | prepend: "/" | prepend: base_path }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -86,13 +86,13 @@
|
|||
{% endif %}
|
||||
|
||||
{% if page.header.image %}
|
||||
<meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
|
||||
<meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endif %}">
|
||||
{% elsif page.header.overlay_image %}
|
||||
<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 %}">
|
||||
<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 %}">
|
||||
{% elsif page.header.teaser %}
|
||||
<meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/images/" | prepend: base_path }}{% endif %}">
|
||||
<meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | prepend: base_path }}{% endif %}">
|
||||
{% elsif site.og_image %}
|
||||
<meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | prepend: "/images/" | prepend: base_path }}{% endif %}">
|
||||
<meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | prepend: "/" | prepend: base_path }}{% endif %}">
|
||||
{% 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 }}
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue