From bd6f729da9a88bd649e6f9a5922aa2a024b88b62 Mon Sep 17 00:00:00 2001 From: "chris (daiyi)" Date: Thu, 1 Dec 2016 23:27:21 +0100 Subject: [PATCH 1/2] Add language tag to rss2 --- rss2.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/rss2.xml b/rss2.xml index 123a764..d778593 100644 --- a/rss2.xml +++ b/rss2.xml @@ -8,6 +8,7 @@ {% if config.feed.hub %}{% endif %} {{ config.description }} + {% if config.language %}{{ config.language }}{% endif %} {{ posts.first().updated.toDate().toUTCString() }} http://hexo.io/ {% for post in posts.toArray() %} From dbc38e051e09300384c8ba3de3a85181efb8ee15 Mon Sep 17 00:00:00 2001 From: "chris (daiyi)" Date: Thu, 1 Dec 2016 23:28:07 +0100 Subject: [PATCH 2/2] Strip formatting from summary/description --- atom.xml | 4 ++-- rss2.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atom.xml b/atom.xml index f67e3ac..3f07951 100644 --- a/atom.xml +++ b/atom.xml @@ -28,9 +28,9 @@ {% if post.description %} {{ post.description }} {% elif post.excerpt %} - {{ post.excerpt }} + {{ post.excerpt | striptags }} {% elif post.content %} - {{ post.content.substring(0, 140) }} + {{ post.content | striptags | truncate(140) }} {% endif %} {% for category in post.categories.toArray() %} diff --git a/rss2.xml b/rss2.xml index d778593..83680e3 100644 --- a/rss2.xml +++ b/rss2.xml @@ -21,9 +21,9 @@ {% if post.description %} {{ post.description }} {% elif post.excerpt %} - {{ post.excerpt }} + {{ post.excerpt | striptags }} {% elif post.content %} - {{ post.content.substring(0, 140) }} + {{ post.content | striptags | truncate(140) }} {% endif %} {% if config.feed.content and post.content %}