Skip to content

Commit

Permalink
Merge pull request #13 from virtualroot/add-rss-support
Browse files Browse the repository at this point in the history
Create an RSS feed for the Articles
  • Loading branch information
osamajandali authored Jan 10, 2024
2 parents 110d496 + 4dd6441 commit 3ac849a
Show file tree
Hide file tree
Showing 7 changed files with 2,428 additions and 2,098 deletions.
Binary file removed .DS_Store
Binary file not shown.
35 changes: 35 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
siteMetadata: {
siteUrl: "https://greensoftware.foundation/",
title: "Green Software Foundation",
description: "The Green Software Foundation is a non-profit with the mission to create a trusted ecosystem of people, standards, tooling and best practices for building green software",
},
plugins: [
{
Expand All @@ -17,6 +18,40 @@ module.exports = {
"gatsby-plugin-image",
"gatsby-plugin-react-helmet",
"gatsby-plugin-sitemap",
{
resolve: "gatsby-plugin-feed",
options: {
feeds: [
{
serialize: ({query: {site, allDatoCmsArticle}}) =>
allDatoCmsArticle.edges.map(edge => ({
title: `${edge.node.title}`,
description: `${edge.node.summary}`,
date: `${edge.node.date}`,
url: `${site.siteMetadata.siteUrl}/articles/${edge.node.slug }`,
guid: `${site.siteMetadata.siteUrl}/articles/${edge.node.slug }`,
})),
query: `{
allDatoCmsArticle(
sort: {fields: date, order: DESC}
filter: { isATranslatedArticle: { ne: true } }
) {
edges {
node {
title
summary
date
slug
}
}
}
}`,
output: "/rss.xml",
title: "Green Software Foundation RSS Feed",
},
],
},
},
{
resolve: "gatsby-plugin-manifest",
options: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"framer-motion": "^7.5.3",
"gatsby": "^4.24.3",
"gatsby-plugin-algolia": "^0.26.0",
"gatsby-plugin-feed": "^4.25.0",
"gatsby-plugin-google-gtag": "^4.24.0",
"gatsby-plugin-image": "^2.24.0",
"gatsby-plugin-mailchimp": "^5.2.2",
Expand Down
Binary file removed src/.DS_Store
Binary file not shown.
Binary file removed src/assets/.DS_Store
Binary file not shown.
Binary file removed src/assets/icons/.DS_Store
Binary file not shown.
4,490 changes: 2,392 additions & 2,098 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 3ac849a

Please sign in to comment.