Skip to content

Commit

Permalink
Prevent copy/paste mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Jul 7, 2024
1 parent f52a78c commit 3b12c62
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/shortcodes/image_figure.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
{% if src != "image link" %}
{# Only validate against placeholders if we're not in the example #}
{% if alt == "image/GIF description" %}
{{ throw(message="Don't forget to write your own image description :)") }}
{% endif %}

{% if caption and caption == "image caption" %}
{{ throw(message="Don't forget to write your own image caption ^^") }}
{% endif %}
{% endif %}

<figure>
{% if link %}<a href="{{link}}">{% endif %}
<img src="{{get_url(path=page.colocated_path ~ src)}}" alt="{{alt}}">
Expand Down

0 comments on commit 3b12c62

Please sign in to comment.