import { mkdirSync, readFileSync, writeFileSync } from 'fs'; import { join } from 'path'; const BUILD_DIR = 'build'; const BASE_URL = 'https://omaib-musprot.hf.space'; const template = readFileSync(join(BUILD_DIR, 'index.html'), 'utf-8'); const routes = [ { path: '', title: 'MuSProt: Multistate Protein Structure Database', description: 'Explore multistate protein structures, pairwise comparisons, energy scores, and functional annotations.', }, { path: 'docs', title: 'MuSProt Documentation', description: 'MuSProt dataset format, SQLite schema, and usage examples.', }, ]; for (const route of routes) { const canonical = `${BASE_URL}/${route.path}`; const head = [ `