Files
medusa-store/www/apps/user-guide/app/sitemap.ts
2025-02-27 12:07:18 +02:00

14 lines
414 B
TypeScript

import { retrieveMdxPages } from "build-scripts"
import type { MetadataRoute } from "next"
import path from "path"
import { config } from "../config"
import { basePathUrl } from "../utils/base-path-url"
export default function sitemap(): MetadataRoute.Sitemap {
return retrieveMdxPages({
basePath: path.resolve("app"),
}).map((filePath) => ({
url: `${config.baseUrl}${basePathUrl(filePath)}`,
}))
}