It seems that next-sitemap is unable to produce sitemaps for dynamic paths, so we're switching back to dynamic server-side sitemap generation

This commit is contained in:
VityaSchel
2023-10-12 18:35:39 +04:00
parent 3af808d77c
commit 813fa218e9
9 changed files with 50 additions and 10 deletions

12
next-sitemap.config.js Normal file
View File

@@ -0,0 +1,12 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const groups = require('./src/shared/data/groups.json')
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://kspsuti.ru',
generateRobotsTxt: false,
generateIndexSitemap: false,
changefreq: 'weekly',
exclude: ['/'],
additionalPaths: async () => Object.keys(groups).map(groupName => `/${groupName}`)
}