title | assets | |||||
---|---|---|---|---|---|---|
Metadata alt tag example |
|
Last active
June 8, 2018 16:44
-
-
Save sskylar/a217c920ec98ea1784af7393c2237f47 to your computer and use it in GitHub Desktop.
Image alt tags with Siteleaf metadata
This file contains hidden or 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
<!-- Basic usage --> | |
{% for asset in page.assets %} | |
<img src="{{ asset.image }}" alt="{{ asset.caption | escape }}"> | |
{% endfor %} | |
<!-- You can customize the HTML any way you wish --> | |
{% for asset in page.assets %} | |
<figure> | |
<img src="{{ asset.image }}" alt="{{ asset.caption | escape }}"> | |
<figcaption>{{ asset.caption }}</figcaption> | |
</figure> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's how this looks in Siteleaf: