Raw
1 import { retrieveMdxPages } from "build-scripts"
2 import type { MetadataRoute } from "next"
3 import path from "path"
4 import { config } from "../config"
5 import { basePathUrl } from "../utils/base-path-url"
6
7 export default function sitemap(): MetadataRoute.Sitemap {
8 return retrieveMdxPages({
9 basePath: path.resolve("app"),
10 }).map((filePath) => ({
11 url: `${config.baseUrl}${basePathUrl(filePath)}`,
12 }))
13 }