Skip to content

Commit

Permalink
fixed post links in sitemap and rss and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamlohar committed Jun 26, 2020
1 parent a79bccf commit e982ef5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
54 changes: 27 additions & 27 deletions gatsby-wordpress-theme-libre/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const siteConfigDefaults = require(`./src/utils/siteConfigDefaults`);
* Further info 👉🏼 https://www.gatsbyjs.org/docs/gatsby-config/
*
*/
module.exports = themeOptions => {
module.exports = (themeOptions) => {
const siteConfig = themeOptions.siteConfig || siteConfigDefaults;
const wordpressConfig = themeOptions.wordpressConfig;

Expand All @@ -21,23 +21,23 @@ module.exports = themeOptions => {
*/
{
resolve: `gatsby-source-wordpress`,
options: wordpressConfig
options: wordpressConfig,
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: path.join(__dirname, `src`, `pages`),
name: `pages`
}
name: `pages`,
},
},
// Setup for optimized images.
// See https://www.gatsbyjs.org/packages/gatsby-image/
{
resolve: `gatsby-source-filesystem`,
options: {
path: path.join(__dirname, `src`, `images`),
name: `images`
}
name: `images`,
},
},
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
Expand All @@ -50,7 +50,7 @@ module.exports = themeOptions => {
edges {
node {
id
slug
slug:permaLinkSlug
date
}
}
Expand All @@ -74,24 +74,24 @@ module.exports = themeOptions => {
}`,
mapping: {
allWordpressPost: {
sitemap: `posts`
sitemap: `posts`,
},
allWordpressTag: {
sitemap: `tags`
sitemap: `tags`,
},
allWordpressWpUsers: {
sitemap: `authors`
}
sitemap: `authors`,
},
},
exclude: [
`/dev-404-page`,
`/404`,
`/404.html`,
`/offline-plugin-app-shell-fallback`
`/offline-plugin-app-shell-fallback`,
],
createLinkInHead: true,
addUncaughtPages: true
}
addUncaughtPages: true,
},
},
`gatsby-plugin-catch-links`,
`gatsby-plugin-react-helmet`,
Expand All @@ -106,8 +106,8 @@ module.exports = themeOptions => {
background_color: siteConfig.backgroundColor,
theme_color: siteConfig.themeColor,
display: `standalone`,
icon: "static/favicon.png"
}
icon: "static/favicon.png",
},
},
{
resolve: `gatsby-plugin-feed`,
Expand All @@ -124,14 +124,14 @@ module.exports = themeOptions => {
feeds: [
{
serialize: ({ query: { site, allWordpressPost } }) => {
return allWordpressPost.edges.map(edge => {
return allWordpressPost.edges.map((edge) => {
return {
title: edge.node.title,
description: edge.node.excerpt,
date: edge.node.date,
url: site.siteMetadata.siteUrl + "/" + edge.node.slug,
guid: site.siteMetadata.siteUrl + "/" + edge.node.slug,
custom_elements: [{ "content:encoded": edge.node.content }]
url: site.siteMetadata.siteUrl + edge.node.slug,
guid: site.siteMetadata.siteUrl + edge.node.slug,
custom_elements: [{ "content:encoded": edge.node.content }],
};
});
},
Expand All @@ -140,7 +140,7 @@ module.exports = themeOptions => {
allWordpressPost(sort: {fields: date, order: DESC}) {
edges {
node {
slug
slug: permaLinkSlug
content
title
excerpt
Expand All @@ -152,9 +152,9 @@ module.exports = themeOptions => {
`,
output: "/rss.xml",
title: siteConfig.siteTitleMeta,
}
]
}
},
],
},
},
{
resolve: "@armada-inc/gatsby-plugin-amp",
Expand All @@ -166,15 +166,15 @@ module.exports = themeOptions => {
relAmpHtmlPattern: `{{canonicalBaseUrl}}{{pathname}}{{pathIdentifier}}`,
useAmpClientIdApi: true,
dirName: __dirname,
themePath: `src/amp-styles/post.amp.css`
}
themePath: `src/amp-styles/post.amp.css`,
},
},
{
resolve: `gatsby-plugin-remove-generator`,
options: {
content: `Draftbox`,
},
},
]
],
};
};
2 changes: 1 addition & 1 deletion gatsby-wordpress-theme-libre/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@draftbox-co/gatsby-wordpress-theme-libre",
"version": "1.0.28",
"version": "1.0.29",
"license": "MIT",
"resolutions": {
"sharp": "0.23.4"
Expand Down

0 comments on commit e982ef5

Please sign in to comment.