this is sample sitemap generator for spa by scraping with puppeteer
compatible node.js version: >=16.13.0
- Clone repo
git clone https://github.com/komura-c/sitemap-generator-for-spa.git
- Install deps
npm i
- Please customize
src/index.ts
import { generateSitemap } from './script/generateSitemap';
// Please customize targetURL and waitSec(wait page rendering seconds)
const targetURL = 'https://example.com';
const waitSec = 6;
void generateSitemap(targetURL, waitSec);
- Run
npm run start