Added alt text to the header image.

This commit is contained in:
Jeff MacKinnon 2023-05-12 15:35:26 -03:00
parent f30beb9ec9
commit c207574e52
2 changed files with 15 additions and 1 deletions

View file

@ -103,6 +103,20 @@ The other files in there can be modified, but don't need to be.
> I'm not sure how this is going to work with an "installable" theme, which is what is holding me back. If you know how this could be done please message me ([mastodon](https://bluenoser.me/@Jeff)) or email jeffmackinnon@proton.me. > I'm not sure how this is going to work with an "installable" theme, which is what is holding me back. If you know how this could be done please message me ([mastodon](https://bluenoser.me/@Jeff)) or email jeffmackinnon@proton.me.
## Use
If you are using the pelican photos plugin, and use the `:image:` tag to create a header image, I've added a `:image_alt:` variable. This adds alt text to the header image.
So, the below set up is for this [post](jeffmackinnon.com/20230511-new_flash.html).
```
:image: {photo}microblog/865A0747.jpg
:image_alt: Macro photo of a flower.
```
## RoadMap ## RoadMap
In order of percieved importance, but not in the order that I will get them done. In order of percieved importance, but not in the order that I will get them done.

View file

@ -104,7 +104,7 @@
<div class="entry-content"> <div class="entry-content">
{% if article.photo_image and SHOW_TOP_IMAGE == True %} {% if article.photo_image and SHOW_TOP_IMAGE == True %}
<a href="{{ SITEURL }}/{{ article.photo_image[1] }}"><img style="display: block; margin: 0 auto 0 0;" src="{{ SITEURL }}/{{ article.photo_image[1] }}" /></a> <a href="{{ SITEURL }}/{{ article.photo_image[1] }}"><img style="display: block; margin: 0 auto 0 0;" src="{{ SITEURL }}/{{ article.photo_image[1] }}" alt="{{ article.image_alt }}"/></a>
{% endif %} {% endif %}