Skip to content

Commit

Permalink
πŸ’„ style(meta): add "…" when using summary with <!-- more -->
Browse files Browse the repository at this point in the history
Removes trailing periods, if they exist, before adding "…".

Partially reverts f03a9b3.
  • Loading branch information
welpo committed Aug 31, 2023
1 parent e72a8da commit 0c87f65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
<meta name="description" content="{{ page.description | striptags | safe }}" />
<meta property="og:description" content="{{ page.description | striptags | safe }}">
{%- elif page.summary %}
<meta name="description" content="{{ page.summary | striptags | safe }}" />
<meta property="og:description" content="{{ page.summary | striptags | safe }}">
<meta name="description" content="{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}…" />
<meta property="og:description" content="{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}…">
{%- else %}
<meta name="description" content="{{ config.description }}" />
<meta property="og:description" content="{{ config.description }}">
Expand Down

0 comments on commit 0c87f65

Please sign in to comment.