Skip to content

Commit

Permalink
Fix website script to generate sitemap.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Feb 14, 2025
1 parent 9310427 commit 21912e7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion website/scripts/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { findNestedFiles } from './utils/index';

const ORIGIN = 'https://valibot.dev';

// Find all route index files
const filePaths = findNestedFiles(
[path.join('src', 'routes')],
[
path.join(
path.dirname(fileURLToPath(import.meta.url)),
'..',
'src',
'routes'
),
],
(fileName) => fileName === 'index.tsx' || fileName === 'index.mdx'
);

Expand Down

0 comments on commit 21912e7

Please sign in to comment.