Skip to content

Commit 069d1be

Browse files
committed
seo
1 parent 30b8071 commit 069d1be

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gatsby-config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ module.exports = {
5050
`,
5151
resolvePages: ({ allSitePage }: { allSitePage: any }) =>
5252
allSitePage.nodes,
53-
serialize: ({ path }: { path: any }) => ({ url: path }),
53+
serialize: ({ site, allSitePage }: { site: any; allSitePage: any }) => {
54+
return allSitePage.nodes.map((node: any) => ({
55+
url: `${site.siteMetadata.siteUrl}${node.path}`,
56+
lastmod: new Date().toISOString(),
57+
priority: node.path === "/" ? 1.0 : 0.8,
58+
}))
59+
},
5460
createLinkInHead: true,
5561
},
5662
},

0 commit comments

Comments
 (0)