Skip to content

Commit 650a94d

Browse files
committed
sitemap
Signed-off-by: Piotr PG Gajek <[email protected]>
1 parent 75beee8 commit 650a94d

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

website/docusaurus.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const config = {
2121
defaultLocale: 'en',
2222
locales: ['en'],
2323
},
24-
2524
presets: [
2625
[
2726
'classic',
@@ -93,6 +92,18 @@ const config = {
9392
},
9493
],
9594
},
95+
sitemap: {
96+
lastmod: 'date',
97+
changefreq: 'weekly',
98+
priority: 0.5,
99+
ignorePatterns: ['/tags/**'],
100+
filename: 'sitemap.xml',
101+
createSitemapItems: async params => {
102+
const { defaultCreateSitemapItems, ...rest } = params;
103+
const items = await defaultCreateSitemapItems(rest);
104+
return items.filter(item => !item.url.includes('/page/'));
105+
}
106+
},
96107
prism: {
97108
additionalLanguages: ['apex'],
98109
theme: prismThemes.dracula,

website/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"dependencies": {
1717
"@docusaurus/core": "^3.7.0",
1818
"@docusaurus/plugin-google-gtag": "^3.7.0",
19+
"@docusaurus/plugin-sitemap": "^3.7.0",
1920
"@docusaurus/preset-classic": "^3.7.0",
2021
"@docusaurus/theme-mermaid": "^3.7.0",
2122
"@mdx-js/react": "^3.0.0",

0 commit comments

Comments
 (0)