Skip to content

Commit e982ef5

Browse files
committed
fixed post links in sitemap and rss and version bump
1 parent a79bccf commit e982ef5

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

gatsby-wordpress-theme-libre/gatsby-config.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const siteConfigDefaults = require(`./src/utils/siteConfigDefaults`);
99
* Further info 👉🏼 https://www.gatsbyjs.org/docs/gatsby-config/
1010
*
1111
*/
12-
module.exports = themeOptions => {
12+
module.exports = (themeOptions) => {
1313
const siteConfig = themeOptions.siteConfig || siteConfigDefaults;
1414
const wordpressConfig = themeOptions.wordpressConfig;
1515

@@ -21,23 +21,23 @@ module.exports = themeOptions => {
2121
*/
2222
{
2323
resolve: `gatsby-source-wordpress`,
24-
options: wordpressConfig
24+
options: wordpressConfig,
2525
},
2626
{
2727
resolve: `gatsby-source-filesystem`,
2828
options: {
2929
path: path.join(__dirname, `src`, `pages`),
30-
name: `pages`
31-
}
30+
name: `pages`,
31+
},
3232
},
3333
// Setup for optimized images.
3434
// See https://www.gatsbyjs.org/packages/gatsby-image/
3535
{
3636
resolve: `gatsby-source-filesystem`,
3737
options: {
3838
path: path.join(__dirname, `src`, `images`),
39-
name: `images`
40-
}
39+
name: `images`,
40+
},
4141
},
4242
`gatsby-plugin-sharp`,
4343
`gatsby-transformer-sharp`,
@@ -50,7 +50,7 @@ module.exports = themeOptions => {
5050
edges {
5151
node {
5252
id
53-
slug
53+
slug:permaLinkSlug
5454
date
5555
}
5656
}
@@ -74,24 +74,24 @@ module.exports = themeOptions => {
7474
}`,
7575
mapping: {
7676
allWordpressPost: {
77-
sitemap: `posts`
77+
sitemap: `posts`,
7878
},
7979
allWordpressTag: {
80-
sitemap: `tags`
80+
sitemap: `tags`,
8181
},
8282
allWordpressWpUsers: {
83-
sitemap: `authors`
84-
}
83+
sitemap: `authors`,
84+
},
8585
},
8686
exclude: [
8787
`/dev-404-page`,
8888
`/404`,
8989
`/404.html`,
90-
`/offline-plugin-app-shell-fallback`
90+
`/offline-plugin-app-shell-fallback`,
9191
],
9292
createLinkInHead: true,
93-
addUncaughtPages: true
94-
}
93+
addUncaughtPages: true,
94+
},
9595
},
9696
`gatsby-plugin-catch-links`,
9797
`gatsby-plugin-react-helmet`,
@@ -106,8 +106,8 @@ module.exports = themeOptions => {
106106
background_color: siteConfig.backgroundColor,
107107
theme_color: siteConfig.themeColor,
108108
display: `standalone`,
109-
icon: "static/favicon.png"
110-
}
109+
icon: "static/favicon.png",
110+
},
111111
},
112112
{
113113
resolve: `gatsby-plugin-feed`,
@@ -124,14 +124,14 @@ module.exports = themeOptions => {
124124
feeds: [
125125
{
126126
serialize: ({ query: { site, allWordpressPost } }) => {
127-
return allWordpressPost.edges.map(edge => {
127+
return allWordpressPost.edges.map((edge) => {
128128
return {
129129
title: edge.node.title,
130130
description: edge.node.excerpt,
131131
date: edge.node.date,
132-
url: site.siteMetadata.siteUrl + "/" + edge.node.slug,
133-
guid: site.siteMetadata.siteUrl + "/" + edge.node.slug,
134-
custom_elements: [{ "content:encoded": edge.node.content }]
132+
url: site.siteMetadata.siteUrl + edge.node.slug,
133+
guid: site.siteMetadata.siteUrl + edge.node.slug,
134+
custom_elements: [{ "content:encoded": edge.node.content }],
135135
};
136136
});
137137
},
@@ -140,7 +140,7 @@ module.exports = themeOptions => {
140140
allWordpressPost(sort: {fields: date, order: DESC}) {
141141
edges {
142142
node {
143-
slug
143+
slug: permaLinkSlug
144144
content
145145
title
146146
excerpt
@@ -152,9 +152,9 @@ module.exports = themeOptions => {
152152
`,
153153
output: "/rss.xml",
154154
title: siteConfig.siteTitleMeta,
155-
}
156-
]
157-
}
155+
},
156+
],
157+
},
158158
},
159159
{
160160
resolve: "@armada-inc/gatsby-plugin-amp",
@@ -166,15 +166,15 @@ module.exports = themeOptions => {
166166
relAmpHtmlPattern: `{{canonicalBaseUrl}}{{pathname}}{{pathIdentifier}}`,
167167
useAmpClientIdApi: true,
168168
dirName: __dirname,
169-
themePath: `src/amp-styles/post.amp.css`
170-
}
169+
themePath: `src/amp-styles/post.amp.css`,
170+
},
171171
},
172172
{
173173
resolve: `gatsby-plugin-remove-generator`,
174174
options: {
175175
content: `Draftbox`,
176176
},
177177
},
178-
]
178+
],
179179
};
180180
};

gatsby-wordpress-theme-libre/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@draftbox-co/gatsby-wordpress-theme-libre",
3-
"version": "1.0.28",
3+
"version": "1.0.29",
44
"license": "MIT",
55
"resolutions": {
66
"sharp": "0.23.4"

0 commit comments

Comments
 (0)