docs: add sitemap to improve SEO

This commit is contained in:
moonrailgun 2024-10-07 17:16:11 +08:00
parent a32f3d9824
commit 384224cb62

View File

@ -57,6 +57,18 @@ const config: Config = {
require.resolve('./src/css/custom.css'), require.resolve('./src/css/custom.css'),
], ],
}, },
sitemap: {
lastmod: 'date',
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
createSitemapItems: async (params) => {
const { defaultCreateSitemapItems, ...rest } = params;
const items = await defaultCreateSitemapItems(rest);
return items.filter((item) => !item.url.includes('/page/'));
},
},
}, },
], ],
], ],