Add alt and caption support to feature images (#812)

* Add alt and caption support to feature images

* Add feature image alt support to post card

* Remove three-curlies
This commit is contained in:
Sodbileg Gansukh
2021-07-05 10:59:21 +08:00
committed by GitHub
parent 21bdffbd8a
commit e49664eca4
6 changed files with 16 additions and 7 deletions

View File

@ -59,8 +59,11 @@ into the {body} tag of the default.hbs template --}}
{{img_url feature_image size="xl"}} 2000w"
sizes="(min-width: 1400px) 1400px, 92vw"
src="{{img_url feature_image size="xl"}}"
alt="{{title}}"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
/>
{{#if feature_image_caption}}
<figcaption>{{feature_image_caption}}</figcaption>
{{/if}}
</figure>
{{/if}}
</header>