Last active
May 16, 2018 19:32
-
-
Save lisilinhart/5275b409ecd70838a8a3e8147f359279 to your computer and use it in GitHub Desktop.
Gatsby Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
siteMetadata: { | |
title: "Lisi Linhart", | |
description: "Lisi Linharts Portfolio & Blog", | |
author: "Lisi Linhart", | |
siteUrl: "https://lisilinhart.info" | |
}, | |
plugins: [ | |
{ | |
resolve: `gatsby-source-filesystem`, | |
options: { | |
path: `${__dirname}/src/pages/`, | |
name: "pages", | |
}, | |
}, | |
{ | |
resolve: `gatsby-source-filesystem`, | |
options: { | |
path: `${__dirname}/src/posts/`, | |
name: `posts`, | |
}, | |
}, | |
{ | |
resolve: `gatsby-transformer-remark`, | |
options: { | |
plugins: [ | |
{ | |
resolve: `gatsby-remark-images`, | |
options: { | |
maxWidth: 590, | |
}, | |
}, | |
{ | |
resolve: `gatsby-remark-responsive-iframe`, | |
options: { | |
wrapperStyle: `margin-bottom: 1.0725rem`, | |
}, | |
}, | |
{ | |
resolve: `gatsby-remark-prismjs`, | |
options: { | |
aliases: {}, | |
}, | |
}, | |
"gatsby-remark-copy-linked-files", | |
"gatsby-remark-smartypants", | |
"gatsby-remark-component", | |
], | |
}, | |
}, | |
`gatsby-transformer-javascript-frontmatter`, | |
`gatsby-transformer-sharp`, | |
`gatsby-plugin-sharp`, | |
{ | |
resolve: `gatsby-plugin-google-analytics`, | |
options: { | |
anonymize: true, | |
respectDNT: true, | |
trackingId: `UA----`, | |
}, | |
}, | |
`gatsby-plugin-offline`, | |
`gatsby-plugin-styled-components`, | |
`gatsby-plugin-react-helmet`, | |
{ | |
resolve: `gatsby-plugin-feed`, | |
options: { | |
query: ` | |
{ | |
site { | |
siteMetadata { | |
title | |
description | |
siteUrl | |
site_url: siteUrl | |
} | |
} | |
} | |
`, | |
feeds: [ | |
{ | |
serialize: ({ query: { site, allMarkdownRemark } }) => { | |
return allMarkdownRemark.edges.map(edge => { | |
return Object.assign({}, edge.node.frontmatter, { | |
description: edge.node.excerpt, | |
url: site.siteMetadata.siteUrl + edge.node.fields.slug, | |
guid: site.siteMetadata.siteUrl + edge.node.fields.slug, | |
custom_elements: [{ "content:encoded": edge.node.html }] | |
}); | |
}); | |
}, | |
query: ` | |
{ | |
allMarkdownRemark( | |
limit: 1000, | |
sort: { order: DESC, fields: [frontmatter___date] }, | |
filter: { id: { regex: "//posts//" } } | |
) { | |
edges { | |
node { | |
excerpt | |
html | |
fields { | |
slug | |
} | |
frontmatter { | |
title | |
date | |
} | |
} | |
} | |
} | |
} | |
`, | |
output: "/rss.xml" | |
} | |
] | |
}, | |
}, | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment