mirror of
https://github.com/welpo/tabi.git
synced 2025-11-23 02:00:25 +01:00
✨ feat: added auto-generated summary to post listing and atom feeds
Post listing and Atom feeds will show post summary in separate paragraph alongside with post description. New defaults (breaking changes): - auto_generated_summary_length = 300 - auto_generated_post_listing_summary = true - auto_generated_atom_feed_summary = true
This commit is contained in:
parent
393c5a8cb9
commit
752aacb84c
4 changed files with 28 additions and 10 deletions
|
|
@ -100,11 +100,18 @@
|
|||
{% 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 -%}
|
||||
<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_generated_atom_feed_summary %}
|
||||
<p>{{ page.content | striptags | truncate(length=config.extra.auto_generated_summary_length) | safe }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</summary>
|
||||
</entry>
|
||||
{%- endfor %}
|
||||
</feed>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue