This commit is contained in:
Lee Kai Ze 2026-02-27 21:30:38 -08:00 committed by GitHub
commit 0c603d6a42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 35 additions and 10 deletions

View file

@ -100,11 +100,20 @@
{% if config.extra.full_content_in_feed %}
<content type="html">{{ page.content }}</content>
{% endif -%}
{% if page.description -%}
<summary type="html">{{ page.description }}</summary>
{% elif page.summary -%}
<summary type="html">{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…</summary>
{% endif -%}
{% if page.description or page.summary or config.extra.auto_generate_post_summary %}
<summary type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
{% if page.description -%}
<p>{{ page.description | markdown(inline=true) | safe }}</p>
{% endif %}
{% if page.summary -%}
<p>{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…</p>
{% elif config.extra.auto_generate_post_summary %}
<p>{{ page.content | striptags | truncate(length=config.extra.auto_generated_summary_length) | safe }}</p>
{% endif %}
</div>
</summary>
{% endif %}
</entry>
{%- endfor %}
</feed>

View file

@ -164,9 +164,12 @@
<div class="description">
{% if post.description %}
<p>{{ post.description | markdown(inline=true) | safe }}</p>
{% elif post.summary %}
<p>{{ post.summary | markdown(inline=true) | trim_end_matches(pat=".") | safe }}…</p>
<p>{{ post.description | markdown(inline=true) | safe }}</p>
{% endif %}
{% if post.summary %}
<p>{{ post.summary | striptags | trim_end_matches(pat=".") | safe }}…</p>
{% elif config.extra.auto_generate_post_summary %}
<p>{{ post.content | striptags | truncate(length=config.extra.auto_generated_summary_length) | safe }}</p>
{% endif %}
</div>
<a class="readmore" href="{{ post.permalink }}">{{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }}&nbsp;<span class="arrow"></span></a>