Skip to content

Commit

Permalink
Ensure I don't forget to write something in the description
Browse files Browse the repository at this point in the history
It's easy to miss in reviews and when I am in the flow.
  • Loading branch information
dmarcoux committed Oct 1, 2024
1 parent ef03c4b commit 00a1b63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@

{% set description = page.description | default(value=config.description) %}
{% set description_length = description | length %}
{# Ensure I don't forget to write something in the description #}
{% if description_length == 0 %}
{{ throw(message="Description is empty") }}
{% endif %}

{# The description must be at most 200 characters, more is not recommended. This is enforced below. #}
{% if description_length > 200 %}
{{ throw(message="Description is longer than 200 characters (" ~ description_length ~ "): " ~ description ) }}
Expand Down

0 comments on commit 00a1b63

Please sign in to comment.