You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
blog/_includes/image.html

20 lines
755 B

{% if include.otherpost == true %}
{% assign url = "/media/" | append: include.file %}
{% else %}
{% capture url %}/media/{{ page.path | remove: "_posts/" | remove: ".md" | append: "/" | append: include.file }}{% endcapture %}
{% endif %}
{% if include.caption %}
<div>
<a href="{{ url | prepend: site.baseurl }}" target="_blank">
<img src="{{ url | prepend: site.baseurl }}" width="300" alt="{% if include.alt %}{{ include.alt }}{% else %}Image{% endif %}">
<div>{{ include.caption }}</div>
</a>
</div>
{% else %}
<div>
<a href="{{ url | prepend: site.baseurl }}" target="_blank">
<img src="{{ url | prepend: site.baseurl }}" width="300" alt="{% if include.alt %}{{ include.alt }}{% else %}Image{% endif %}">
</a>
</div>
{% endif %}