mirror of
https://github.com/welpo/tabi.git
synced 2025-11-23 02:00:25 +01:00
Merge 827e8524da into ab4bcd5695
This commit is contained in:
commit
e81fed241f
5 changed files with 34 additions and 10 deletions
|
|
@ -169,6 +169,12 @@ show_date = true
|
||||||
# "both" - Show both the original date and the last updated date.
|
# "both" - Show both the original date and the last updated date.
|
||||||
post_listing_date = "date"
|
post_listing_date = "date"
|
||||||
|
|
||||||
|
# Auto generate summary for post listing and Atom feeds,
|
||||||
|
# when no summary is set using the <!-- more --> tag.
|
||||||
|
# It will be generated in separated paragraph alongside with post description.
|
||||||
|
auto_generate_post_summary = true
|
||||||
|
auto_generated_summary_length = 200
|
||||||
|
|
||||||
# Enable iine like buttons on all posts: https://iine.to/
|
# Enable iine like buttons on all posts: https://iine.to/
|
||||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||||
iine = true
|
iine = true
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:tabi="https://github.com/welpo/tabi">
|
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:tabi="https://github.com/welpo/tabi"
|
||||||
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||||
|
|
@ -100,7 +101,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<xsl:value-of select="atom:summary"/>
|
<xsl:copy-of select="atom:summary/xhtml:div/*"/>
|
||||||
</div>
|
</div>
|
||||||
<a class="readmore" href="">
|
<a class="readmore" href="">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
|
|
|
||||||
|
|
@ -100,11 +100,19 @@
|
||||||
{% if config.extra.full_content_in_feed %}
|
{% if config.extra.full_content_in_feed %}
|
||||||
<content type="html">{{ page.content }}</content>
|
<content type="html">{{ page.content }}</content>
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
<summary type="xhtml">
|
||||||
|
<!-- xhtml allows multi-paragraph summary -->
|
||||||
|
<div xmlns="http://www.w3.org/1999/xhtml">
|
||||||
{% if page.description -%}
|
{% if page.description -%}
|
||||||
<summary type="html">{{ page.description }}</summary>
|
<p>{{ page.description | markdown(inline=true) | safe }}</p>
|
||||||
{% elif page.summary -%}
|
{% endif %}
|
||||||
<summary type="html">{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…</summary>
|
{% if page.summary -%}
|
||||||
{% endif -%}
|
<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>
|
||||||
</entry>
|
</entry>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</feed>
|
</feed>
|
||||||
|
|
|
||||||
|
|
@ -143,8 +143,11 @@
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{% if post.description %}
|
{% if post.description %}
|
||||||
<p>{{ post.description | markdown(inline=true) | safe }}</p>
|
<p>{{ post.description | markdown(inline=true) | safe }}</p>
|
||||||
{% elif post.summary %}
|
{% endif %}
|
||||||
<p>{{ post.summary | markdown(inline=true) | trim_end_matches(pat=".") | safe }}…</p>
|
{% 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 %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<a class="readmore" href="{{ post.permalink }}">{{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }} <span class="arrow">→</span></a>
|
<a class="readmore" href="{{ post.permalink }}">{{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }} <span class="arrow">→</span></a>
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,12 @@ show_date = true
|
||||||
# "both" - Show both the original date and the last updated date.
|
# "both" - Show both the original date and the last updated date.
|
||||||
post_listing_date = "date"
|
post_listing_date = "date"
|
||||||
|
|
||||||
|
# Auto generate summary for post listing and Atom feeds,
|
||||||
|
# when no summary is set using the <!-- more --> tag.
|
||||||
|
# It will be generated in separated paragraph alongside with post description.
|
||||||
|
auto_generate_post_summary = true
|
||||||
|
auto_generated_summary_length = 200
|
||||||
|
|
||||||
# Enable iine like buttons on all posts: https://iine.to/
|
# Enable iine like buttons on all posts: https://iine.to/
|
||||||
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy
|
||||||
iine = false
|
iine = false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue