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 123a764..83680e3 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() %} @@ -20,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 %}