forked from langfuse/langfuse-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
26 lines (24 loc) · 865 Bytes
/
next-sitemap.config.js
File metadata and controls
26 lines (24 loc) · 865 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
const cookbookRoutes = require("./cookbook/_routes.json");
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.CF_PAGES_URL ?? 'https://langfuse.com',
generateRobotsTxt: true,
changefreq: 'daily',
additionalPaths: async (config) => [{
loc: '/',
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", "")}`),
// Exclude _meta files
'*/_meta',
'/events/*',
// Exclude API routes for static export
...(process.env.STATIC_EXPORT === 'true' ? ['/api/*'] : [])
],
}