3

I have to convert multiple .md files into a single HTML file.

Is it possible? Pandoc can convert .md to HTMLbut not sure if it can do it for multiple files.

Or would I need to write a program to manipulate the tool?

Mandroid
  • 6,200
  • 12
  • 64
  • 134

2 Answers2

3

You can concatenate the files in lexicographical order of their names by using the following command:

pandoc *.md > all.html

For example, if in your folder, you have files like this:

k.md, w.md, t.md, a.md

they will be concatenated in following order:

a.md
k.md
t.md
w.md

the final output file will be

all.html
2
pandoc *.md -o result.html

Try this

Tallboy
  • 12,847
  • 13
  • 82
  • 173