Skip to content

Commit

Permalink
RSS Feed
Browse files Browse the repository at this point in the history
  • Loading branch information
v4iv committed Apr 1, 2018
1 parent cad44a8 commit 2be494d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ It follows the [JAMstack architecture](https://jamstack.org) by using Git as a s
- Disqus Support
- Google Tag Manager Support
- Sass
- Offline Support
- Offline
- RSS Feed

## TODO
- Pagination
Expand Down
8 changes: 6 additions & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ module.exports = {
{
serialize(ctx) {
const rssMetadata = ctx.query.site.siteMetadata.rssMetadata;
return ctx.query.allMarkdownRemark.edges.map(edge => ({
return ctx.query.allMarkdownRemark.edges
.filter(edge => edge.node.frontmatter.templateKey === 'article-page')
.map(edge => ({
categories: edge.node.frontmatter.tags,
date: edge.node.frontmatter.date,
title: edge.node.frontmatter.title,
Expand All @@ -143,11 +145,13 @@ module.exports = {
) {
edges {
node {
excerpt
excerpt(pruneLength: 400)
html
id
fields { slug }
frontmatter {
title
templateKey
cover
date(formatString: "MMMM DD, YYYY")
tags
Expand Down

0 comments on commit 2be494d

Please sign in to comment.