A small node.js script that takes a folder path to markdown files and then generate html files using showdown.
See configuration on how to include css and js into the generated files.
When done, all markdown files will be at the destination as .html files and a reference can be found at tree.json (in both source and destination folders)
npm install batch-showdown -g
batch-showdown <source_folder> <destination_folder> [configuration.js] [verbose?]
# Example
batch-showdown src/docs public/docs
Install and add it to dependencies
npm install batch-showdown --save
Make a script in package.json
"scripts":{
"docs": "batch-showdown src/docs public/docs"
}
Run script from project folder
npm run docs
Pass a configuration (.js) file as third argument. Configuration looks like this:
module.exports = {
css: ["path/to/some/style.css"],
js: ["path/to/some/script.js"],
onload: "runScript();"
}