Files
nym/documentation/docs/next-sitemap.config.js
bnemeroff 5e733a5ebf SEO: Add frontmatter, structured data, and sitemap config (#6453)
* SEO: Add frontmatter, structured data, and sitemap config

* Fix: restore deleted prebuild output file

---------

Co-authored-by: Benjamin Nemeroff <ben@Benjamins-MacBook-Air.local>
Co-authored-by: mfahampshire <maxhampshire@pm.me>
2026-02-25 09:48:15 +00:00

28 lines
836 B
JavaScript

/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://nymtech.net/docs',
generateRobotsTxt: true,
outDir: './public',
exclude: ['/api/*', '/docs/_*', '/404'],
robotsTxtOptions: {
policies: [
{ userAgent: '*', allow: '/' },
{ userAgent: '*', disallow: ['/api/', '/_next/'] },
],
additionalSitemaps: [
'https://nymtech.net/docs/sitemap-docs.xml',
],
},
transform: async (config, path) => ({
loc: path,
changefreq: path.includes('/changelog')
? 'weekly'
: path.includes('/docs/operators') || path.includes('/docs/developers')
? 'monthly'
: 'yearly',
priority: path === '/docs' ? 1.0
: path.includes('/operators/nodes') || path.includes('/developers') ? 0.8
: 0.6,
lastmod: new Date().toISOString(),
}),
}