Skip to content

Commit

Permalink
defaulting description to excerpt if exists and removing layout none …
Browse files Browse the repository at this point in the history
…which was throwing warnings on build time
  • Loading branch information
integrii committed Dec 9, 2014
1 parent 0c57133 commit 209b83b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions feed.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: none
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
Expand All @@ -11,11 +10,13 @@ layout: none
{% for post in site.posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
{% if post.description %}
<description>{{ post.description | xml_escape }}</description>
{% else %}
<description>{{ site.description | xml_escape }}</description>
{% endif %}
{% if post.excerpt %}
<description>{{ post.excerpt | xml_escape }}</description>
{% elsif post.description %}
<description>{{ post.description | xml_escape }}</description>
{% else %}
<description>{{ site.description | xml_escape }}</description>
{% endif %}
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
Expand Down

4 comments on commit 209b83b

@misterjules
Copy link

@misterjules misterjules commented on 209b83b Jan 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found naming layout: null in the front matter worked for me as "none" was causing an error

@georgemandis
Copy link
Owner

@georgemandis georgemandis commented on 209b83b Jan 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What version of Jekyll are you using?

@misterjules
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.3.1

@georgemandis
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using an older version of jekyll-rss? The frontmatter should be empty.

Please sign in to comment.