You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
351 B
TypeScript

import { writeFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { sitemapModule } from '@/server/sitemap';
const genSitemap = () => {
const sitemapIndexXML = sitemapModule.getIndex();
const filename = resolve(__dirname, '../../', 'public', 'sitemap-index.xml');
writeFileSync(filename, sitemapIndexXML);
};
genSitemap();