Forked from an inaccessible project.
-
resynth1943 authoredresynth1943 authored
random.js 434 B
const fs = require('fs');
const path = require('path');
const words = fs.readFileSync(path.resolve(__dirname, './words.txt'), 'utf8').split('\n');
for (const word of words) {
const filePath = path.resolve(__dirname, '../replace/', `./${word}.md`);
fs.writeFileSync(filePath, `\
---
layout: replace
title: ${word}
type: 'Anything, really'
---
# ${word}
${word} is really cool dude
`);
console.log(`wrote ${word}.md`);
}