2

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
  • 3,359
  • 3
  • 28
  • 59

2 Answers2

2
pandoc *.md -o result.html

Try this

Tallboy
  • 11,480
  • 11
  • 67
  • 151
2

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