const pages = require("/var/www/html/theunderland/wiki/pages.js"); const filePath = "/var/www/html/theunderland/wiki/pages/"; const fs = require("fs"); const { pageTop, pageBottom } = require("/var/www/html/html.js") console.log(pages); //////////////////////////////// // Make each individual blog page ///////////////////////////////// for (let length = 0; length < pages.length; length++) { console.log(length) const pageFilePath = filePath + pages[length][0] + ".html"; // Makes anything surrounded by && into a link to that page let wikiText = pages[length][2]; wikiText = wikiText.replace(/&&([^&]+)&&/g, '$1'); let content = `
${wikiText}