Where markdown=markdown language file and $output is your outputfile.html
pandoc -f markdown $markdown -t html5 --toc --toc-depth=1 > $output
pandoc, convert, markdown, htmlwhere, output, outputfile, html, toc, depth,