if share-img not provided, use cover-img or thumbnail. Also make sure all images work with both relative and absolute paths

This commit is contained in:
Dean Attali 2020-07-07 05:14:01 +00:00
parent 88464eb569
commit b2b6922a8f
5 changed files with 35 additions and 22 deletions

View file

@ -10,10 +10,10 @@
{% assign imgnum = forloop.index %}
{% for imginfo in bigimg %}
{% if imginfo[0] %}
data-img-src-{{ imgnum }}="{{ imginfo[0] | relative_url }}"
data-img-src-{{ imgnum }}="{{ imginfo[0] | absolute_url }}"
data-img-desc-{{ imgnum }}="{{ imginfo[1] }}"
{% else %}
data-img-src-{{ imgnum }}="{{ imginfo | relative_url }}"
data-img-src-{{ imgnum }}="{{ imginfo | absolute_url }}"
{% endif %}
{% endfor %}
{% endfor %}