feat: add sitemap.xml generation + type definitions + robots.txt update
This commit is contained in:
parent
acf877f325
commit
5af9f8e1ed
5 changed files with 98 additions and 2 deletions
16
frontend/scripts/copy-sitemap.mjs
Normal file
16
frontend/scripts/copy-sitemap.mjs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { cpSync, existsSync } from 'node:fs';
|
||||
import { resolve, dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const distDir = resolve(__dirname, '..', 'dist', 'client');
|
||||
|
||||
const source = resolve(distDir, 'sitemap-0.xml');
|
||||
const target = resolve(distDir, 'sitemap.xml');
|
||||
|
||||
if (existsSync(source)) {
|
||||
cpSync(source, target);
|
||||
console.log('✅ sitemap.xml created');
|
||||
} else {
|
||||
console.error('❌ sitemap-0.xml not found');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue