Mystery Master | Build HTML Puzzle Indexes | Member |
---|
This metawork article explains how I build the HTML puzzle index files. The JavaScript module build-puzzle-indexes.mjs creates three HTML index files to display the puzzles. The three HTML files (no PHP, no CSS) are:
index-by-name.html
- display puzzles by name in a listindex-by-tile.html
- display puzzles by name as tile (image).index-by-rank.html
- display puzzles by name in a list grouped by rank (stars).Below is the source code.
/* jshint esversion: 6 */ // 1. Change cwd: cd /projects/mysterymaster.com/metawork/js/server // 2. Run script: node build-puzzle-indexes.mjs import { buildPuzzleIndexes } from "./Filer.js"; // Builds puzzle indexes as HTML files. buildPuzzleIndexes();