pandoc -f markdown -t html5 -o output.html input.md -c style.css
Make a file with sh
extension, like io.sh
with content like:
#!/bin/bash -x
# write to file
overwrite_to_file()
{
pandoc -f markdown -t html5 -o "ouptut-1.html" "input-1.md" -c "style.css"
pandoc -f markdown -t html5 -o "ouptut-2.html" "input-2.md" -c "style.css"
}
# execute it
overwrite_to_file
Make executable from commandline like:
chmod +x io.sh
To use the script to convert multiple markdown files to multiple html files with this executable bash script from the commandline: type "io.sh" in the terminal and hit ENTER
A quick update: I was using the above command and nothing was happening. After going over the pandoc docs, I added -s and seems to work. Maybe you can check as well?
pandoc -s -f markdown -t html5 -o output.html input.md -c style.css