4

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?

1
  • ... just concatenate them together? Would that work? Commented Jan 23, 2018 at 5:57

2 Answers 2

3
pandoc *.md -o result.html

Try this

Sign up to request clarification or add additional context in comments.

3 Comments

pandoc: *.md: openBinaryFile: invalid argument (Invalid argument)
Thanks for the link.This is what I need.
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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.