avoid empty divs

This commit is contained in:
welpo 2026-01-31 21:20:38 +01:00
parent 876c3f64a9
commit 8c24c2bab5
No known key found for this signature in database
GPG key ID: A2F978CF4EC1F5A6

View file

@ -100,19 +100,20 @@
{% if config.extra.full_content_in_feed %}
<content type="html">{{ page.content }}</content>
{% endif -%}
{% if page.description or page.summary or config.extra.auto_generate_post_summary %}
<summary type="xhtml">
<!-- xhtml allows multi-paragraph summary -->
<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>
<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>