Programmatic pages are easy to ship and hard to audit. You write one template, feed it a list, and get a directory of HTML files. Nothing errors. Every page renders. The nav works, the sitemap validates, and the whole thing looks finished.
The part that isn't finished is the part you can't see: how much of each page is actually about that page, and whether the machine-readable files describing your site agree with the files themselves.
I shipped 87 pages that way, then went back and measured them properly. Five of the numbers were not what I expected. Here they are, with the scripts that produced them.
The setup
One Node script, no framework, no bundler. Input is a JSON array of intents:
// intents.json [ { " slug " : " michael-in-chinese " , " family " : " transliteration " , " subject " : " Michael " }, { " slug " : " chinese-names-that-mean-courage " , " family " : " meaning " , " subject " : " courage " } ]
Enter fullscreen mode
Exit fullscreen mode
Each entry becomes dist/<slug>/index.html .β¦