MCPcopy Create free account
hub / github.com/Oslonline/dithering-studio / readAlgorithmRoutes

Function readAlgorithmRoutes

scripts/prerender.mjs:14–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12const languages = ['en', 'fr', 'es', 'de', 'zh', 'ru', 'hi'];
13
14const readAlgorithmRoutes = async () => {
15 try {
16 const slugPath = path.resolve(__dirname, '..', 'src', 'data', 'algorithm-slugs.json');
17 const raw = await fs.readFile(slugPath, 'utf8');
18 const parsed = JSON.parse(raw);
19 const slugs = Object.values(parsed).filter((v) => typeof v === 'string');
20 return slugs.map((slug) => `/Education/Algorithms/${slug}`);
21 } catch {
22 return [];
23 }
24};
25
26const staticBaseRoutes = ['/', '/Dithering/Image', '/Dithering/Video', '/Education', '/Education/Basics', '/Education/Practice', '/Education/Algorithms'];
27let algorithmRoutes = [];

Callers 1

prerender.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected