It should be possible to write a script to find all the input files, sort them, then feed them to pandoc while prepending the title of the file to its content as a markdown header.