INNER CODE UNIT · TypeScript

sitemap

niledatabase/niledatabase · www/app/sitemap.ts:4

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  const files = await glob(
    [
      'app/blog/**/*.mdx',
      'app/careers/**/*.mdx',
      // do something about templates
    ],
    { stat: true, withFileTypes: true },
  );

  const pages = [];
  for (const file of files) {
    const path = file
      .relative()
      .replace('.mdx', '')
      .replace('/[[...slug]]', '')
      .replace('/index', '')
      .replace(/^app\//, '');

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…