Skip to content

Commit

Permalink
Fallback to frontmatter excerpt if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiedo committed Aug 1, 2017
1 parent 8c35f26 commit b51a41f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-feed/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const serialize = ({ query: { site, allMarkdownRemark } }) =>
allMarkdownRemark.edges.map(edge => {
return {
...edge.node.frontmatter,
description: edge.node.excerpt,
description: edge.node.excerpt || edge.node.frontmatter.excerpt,
url: site.siteMetadata.siteUrl + edge.node.fields.slug,
guid: site.siteMetadata.siteUrl + edge.node.fields.slug,
custom_elements: [{ "content:encoded": edge.node.html }],
Expand Down
1 change: 1 addition & 0 deletions packages/gatsby-plugin-feed/src/internals.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const defaultOptions = {
node {
frontmatter {
title
excerpt
date
}
fields {
Expand Down

0 comments on commit b51a41f

Please sign in to comment.