feat: post alt texts

This commit is contained in:
Ayo Ayco 2025-07-09 20:56:38 +02:00
parent 94094fd40d
commit c7f5899b9d

View file

@ -19,7 +19,7 @@ layout: default
datetime="{{ page.date | date: "%Y-%m-%d" }}" datetime="{{ page.date | date: "%Y-%m-%d" }}"
itemprop="datePublished" itemprop="datePublished"
> >
🗓️ {% assign date_format = "%b %-d, %Y" %} {{ page.date | date: date_format }} 🗓️ {% assign date_format = "%b %-d, %Y" %} {{ page.date | date: date_format }}
</time> </time>
</div> </div>
@ -27,11 +27,12 @@ layout: default
<img <img
class="blog-post__header__image" class="blog-post__header__image"
{% if page.image-alt %} {% if page.image-alt %}
alt="{{page.image-alt | escape}} • Header image for: {{page.title | escape}} • {{page.description | escape}} • {{site.title | escape}} • {{site.description | escape}} • {{site.author | escape}}" alt="{{page.image-alt | escape}} - [Header image for the post: {{page.title | escape}} - {{page.description | escape}}]"
{% else %} {% else %}
alt="Header image for: {{page.title | escape}} • {{page.description | escape}} • {{site.title | escape}} • {{site.description | escape}} • {{site.author | escape}}" alt="[Header image for the post: {{page.title | escape}} - {{page.description | escape}}]"
{% endif %} {% endif %}
title="Header image for: {{page.title | escape}} • {{page.description | escape}} • {{site.title | escape}} • {{site.description | escape}} • {{site.author | escape}}"
title="[Header image for the post: {{page.title | escape}} - {{page.description | escape}}]"
{% if page.image %} {% if page.image %}
src="../assets/images/{{page.image}}.jpg" src="../assets/images/{{page.image}}.jpg"
@ -41,14 +42,14 @@ layout: default
/> />
<p class="blog-post__header__image-caption"> <p class="blog-post__header__image-caption">
{% if page.image-alt %} {% if page.image-alt %}
<span> <span>
{{ page.image-alt }} {{ page.image-alt }}
</span> </span>
{% endif %} {% endif %}
{% if page.image-attrib %} {% if page.image-attrib %}
{% if page.image-alt %} {% if page.image-alt %}
{% endif %} {% endif %}
{% if page.image-attrib-url %} {% if page.image-attrib-url %}
@ -60,7 +61,7 @@ layout: default
{% endif %} {% endif %}
{% endif %} {% endif %}
</p> </p>
{% endif %} {% endif %}
</header> </header>
@ -99,4 +100,4 @@ layout: default
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a> <a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
</article> </article>