Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
## _includes/image.html
<div class="image-wrapper" >
{% if include.url %}
<a href="{{ include.url }}" title="{{ include.title }}" target="_blank">
{% endif %}
<img src="{{ site.url }}/{{ include.img }}" alt="{{ include.title }}"/>
{% if include.url %}
</a>
{% endif %}
{% if include.caption %}
<p class="image-caption">{{ include.caption }}</p>
{% endif %}
</div>
## Include the image in your post and specify a caption with this tag
{% include image.html img="assets/images/image_file" title="" caption="" %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.