Skip to content

Commit

Permalink
Merge 64102fe into 76c220b
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Jan 5, 2020
2 parents 76c220b + 64102fe commit 656d11d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
20 changes: 9 additions & 11 deletions atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,33 @@
{% if config.feed.content and post.content %}
<content type="html"><![CDATA[{{ post.content | noControlChars | safe }}]]></content>
{% endif %}
<summary type="html">
{% if post.description %}
{{ post.description }}
<summary type="html">{{ post.description }}</summary>
{% elif post.intro %}
{{ post.intro }}
<summary type="html">{{ post.intro }}</summary>
{% elif post.excerpt %}
{{ post.excerpt }}
<summary type="html">{{ post.excerpt }}</summary>
{% elif post.content %}
{% set short_content = post.content.substring(0, config.feed.content_limit) %}
{% if config.feed.content_limit_delim %}
{% set delim_pos = short_content.lastIndexOf(config.feed.content_limit_delim) %}
{% if delim_pos > -1 %}
{{ short_content.substring(0, delim_pos) }}
<summary type="html">{{ short_content.substring(0, delim_pos) }}</summary>
{% else %}
{{ short_content }}
<summary type="html">{{ short_content }}</summary>
{% endif %}
{% else %}
{{ short_content }}
<summary type="html">{{ short_content }}</summary>
{% endif %}
{% endif %}
</summary>
{% if post.image %}
<content src="{{ url + post.image | uriencode }}" type="image" />
<content src="{{ url + post.image | uriencode }}" type="image"/>
{% endif %}
{% for category in post.categories.toArray() %}
<category term="{{ category.name }}" scheme="{{ url + category.path | uriencode }}"/>
<category term="{{ category.name }}" scheme="{{ url + category.path | uriencode }}"/>
{% endfor %}
{% 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 %}
</entry>
{% endfor %}
Expand Down
16 changes: 7 additions & 9 deletions rss2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,27 @@
<link>{{ post.permalink | uriencode }}</link>
<guid>{{ post.permalink | uriencode }}</guid>
<pubDate>{{ post.date.toDate().toUTCString() }}</pubDate>
<description>
{% if post.description %}
{{ post.description }}
<description>{{ post.description }}</description>
{% elif post.intro %}
{{ post.intro }}
<description>{{ post.intro }}</description>
{% elif post.excerpt %}
{{ post.excerpt }}
<description>{{ post.excerpt }}</description>
{% elif post.content %}
{% set short_content = post.content.substring(0, config.feed.content_limit) %}
{% if config.feed.content_limit_delim %}
{% set delim_pos = short_content.lastIndexOf(config.feed.content_limit_delim) %}
{% if delim_pos > -1 %}
{{ short_content.substring(0, delim_pos) }}
<description>{{ short_content.substring(0, delim_pos) }}</description>
{% else %}
{{ short_content }}
<description>{{ short_content }}</description>
{% endif %}
{% else %}
{{ short_content }}
<description>{{ short_content }}</description>
{% endif %}
{% endif %}
</description>
{% if post.image %}
<enclosure url="{{ url + post.image | uriencode }}" type="image" />
<enclosure url="{{ url + post.image | uriencode }}" type="image"/>
{% endif %}
{% if config.feed.content and post.content %}
<content:encoded><![CDATA[{{ post.content | noControlChars | safe }}]]></content:encoded>
Expand Down

0 comments on commit 656d11d

Please sign in to comment.