mirror of https://gitlab.com/curben/blog
fix(feed): remove new lines from summary
This commit is contained in:
parent
f05f7ab47b
commit
e8b76e3ae9
|
@ -25,32 +25,30 @@
|
||||||
{% if config.feed.content and post.content %}
|
{% if config.feed.content and post.content %}
|
||||||
<content type="html"><![CDATA[{{ post.content | noControlChars | safe }}]]></content>
|
<content type="html"><![CDATA[{{ post.content | noControlChars | safe }}]]></content>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<summary type="html">
|
|
||||||
{% if post.description %}
|
{% if post.description %}
|
||||||
{{ post.description }}
|
<summary type="html">{{ post.description }}</summary>
|
||||||
{% elif post.intro %}
|
{% elif post.intro %}
|
||||||
{{ post.intro }}
|
<summary type="html">{{ post.intro }}</summary>
|
||||||
{% elif post.excerpt %}
|
{% elif post.excerpt %}
|
||||||
{{ post.excerpt }}
|
<summary type="html">{{ post.excerpt }}</summary>
|
||||||
{% elif post.content %}
|
{% elif post.content %}
|
||||||
{% set short_content = post.content.substring(0, config.feed.content_limit) %}
|
{% set short_content = post.content.substring(0, config.feed.content_limit) %}
|
||||||
{% if config.feed.content_limit_delim %}
|
{% if config.feed.content_limit_delim %}
|
||||||
{% set delim_pos = short_content.lastIndexOf(config.feed.content_limit_delim) %}
|
{% set delim_pos = short_content.lastIndexOf(config.feed.content_limit_delim) %}
|
||||||
{% if delim_pos > -1 %}
|
{% if delim_pos > -1 %}
|
||||||
{{ short_content.substring(0, delim_pos) }}
|
<summary type="html">{{ short_content.substring(0, delim_pos) }}</summary>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ short_content }}
|
<summary type="html">{{ short_content }}</summary>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ short_content }}
|
<summary type="html">{{ short_content }}</summary>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</summary>
|
|
||||||
{% if post.image %}
|
{% if post.image %}
|
||||||
<content src="{{ url + post.image | uriencode }}" type="image" />
|
<content src="{{ url + post.image | uriencode }}" type="image" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for tag in post.tags.toArray() %}
|
{% for tag in post.tags.toArray() %}
|
||||||
<category term="{{ tag.name }}" scheme="{{ url + tag.path | uriencode }}"/>
|
<category term="{{ tag.name }}" scheme="{{ url + tag.path | uriencode }}"/>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</entry>
|
</entry>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue