diff --git a/_includes/page__hero.html b/_includes/page__hero.html index 24488932ae5f..97090d0721ac 100644 --- a/_includes/page__hero.html +++ b/_includes/page__hero.html @@ -45,7 +45,11 @@

{% endif %} {% else %} + {% if page.header.image_description %} + {{ page.header.image_description }} + {% else %} {{ page.title }} + {% endif %} {% endif %} {% if page.header.caption %} {{ page.header.caption | markdownify | remove: "

" | remove: "

" }}
diff --git a/docs/_docs/10-layouts.md b/docs/_docs/10-layouts.md index 5285fcf06cb9..39f8b288f282 100644 --- a/docs/_docs/10-layouts.md +++ b/docs/_docs/10-layouts.md @@ -273,6 +273,14 @@ header: image: http://some-site.com/assets/images/image.jpg ``` +To provide a custom alt tag for screen readers: + +```yaml +header: + image: /assets/images/unsplash-image-1.jpg + image_description: "A description of the image" +``` + To include a caption or attribution for the image: ```yaml