Last active
December 27, 2020 22:10
-
-
Save bpatra/56d9f3085f13d85de6b80b95bd4e0b9d to your computer and use it in GitHub Desktop.
Image Caption for Image in Personal Blog Posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure class="centered-figure {{ include.size_class }} {{ include.position_class }}"> | |
{% if include.title %} | |
{% assign title = include.title %} | |
{% else %} | |
{% assign title = include.caption %} | |
{% endif %} | |
<img src="{{ include.imageurl }}" alt="{{ title }}" /> | |
{% if include.caption %} | |
<figcaption class="caption-text">{{ include.caption }}</figcaption> | |
{% endif %} | |
</figure> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment