Skip to content

Commit

Permalink
💄 style: add "…" when using summary with <!-- more -->
Browse files Browse the repository at this point in the history
Removes trailing periods, if they exist, befor adding "…".

Partially reverts f03a9b3.
  • Loading branch information
welpo committed Aug 30, 2023
1 parent 718f477 commit e72a8da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<link rel="alternate" href="{{ page.permalink | safe }}" type="text/html"/>
<id>{{ page.permalink | safe }}</id>
{% if page.summary -%}
<summary type="html">{{ page.summary | striptags | safe }}</summary>
<summary type="html">{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}…</summary>
{% elif page.description -%}
<summary type="html">{{ page.description | striptags | safe }}</summary>
{% endif -%}
Expand Down
2 changes: 1 addition & 1 deletion templates/macros/list_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{% if post.description %}
<p>{{ post.description | striptags | safe }}</p>
{% elif post.summary %}
<p>{{ post.summary | striptags | safe }}</p>
<p>{{ post.summary | striptags | safe | trim_end_matches(pat=".") }}…</p>
{% endif %}
</div>

Expand Down

0 comments on commit e72a8da

Please sign in to comment.