[id].astro (586B)
1 --- 2 import { loadAllRuns } from "../../lib/data"; 3 4 export function getStaticPaths() { 5 const runs = loadAllRuns(); 6 const seen = new Set<string>(); 7 const paths = []; 8 9 for (const run of runs) { 10 const shortCellId = run.meta.short_cell_id; 11 const cellId = run.meta.cell_id; 12 if (shortCellId && !seen.has(shortCellId)) { 13 seen.add(shortCellId); 14 paths.push({ 15 params: { id: shortCellId }, 16 props: { cellId }, 17 }); 18 } 19 } 20 21 return paths; 22 } 23 24 const { cellId } = Astro.props; 25 --- 26 27 <meta http-equiv="refresh" content={`0;url=/cell/${cellId}`} />