-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
27 lines (25 loc) · 996 Bytes
/
Copy pathnext-sitemap.config.js
File metadata and controls
27 lines (25 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const cookbookRoutes = require("./cookbook/_routes.json");
const PAGES_SITEMAP_PREFIXES = ["/templates", "/company", "/agentkits", "/integrations"];
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://lamatic.ai',
generateRobotsTxt: true,
changefreq: 'daily',
additionalPaths: async (config) => [{
loc: '/public',
priority: 1,
changefreq: 'daily',
lastmod: new Date().toISOString()
}],
exclude: [
// Exclude non-canonical pages from sitemap which are also part of the docs
...cookbookRoutes
.filter(({ docsPath }) => !!docsPath)
.map(({ notebook }) => `/guides/cookbook/${notebook.replace(".ipynb", "")}`),
// Separate sitemap for these sections (see scripts/generate-pages-sitemap.js)
...PAGES_SITEMAP_PREFIXES.flatMap(p => [p, `${p}/*`]),
],
robotsTxtOptions: {
additionalSitemaps: ['https://lamatic.ai/sitemap-pages.xml'],
},
};