const fs = require('fs') const convert = require('./convert') const paths = [] const ignoreFiles = ['_navbar.md', '_sidbar.md'] // loop all markdown files of the current folder fs.readdirSync(__dirname).filter(file => (file.slice(-3) === '.md') && (ignoreFiles.indexOf(file) != 0)).forEach((file) => { // get markdown content var content = fs.readFileSync(file, 'utf8') // set new file name newfile = convert.sanitizeFilename(file) // push filename paths.push('/' + newfile.replace('.md', '')) // add footer content = content + [ '\n\n', '