Skip to content

Latest commit

 

History

History
21 lines (20 loc) · 1.03 KB

create-epub-book-from-markdown-files.md

File metadata and controls

21 lines (20 loc) · 1.03 KB
title date references
Create an epub Book from Markdown Files
2023-12-21
  • Put all your markdown files in a in single directory.
    • Not required but it makes everything a lot easier.
  • Run the pandoc command over all the files, and use -o to set output path with preferred file extension:
    • pandoc file1.md file2.md file3.md -o my-book.epub
  • Metadata is effectively ignored by virtue of being completely overridden by the metadata in the last file. So,
    • Create a single file with metadata, defined with yaml.
    • Know that you need to use a .txt extension, as yaml is not supported.
  • Include metadata as last file.
    • pandoc file1.md file2.md metadata.txt -o my-book.epub.
  • This command can be added to a bash script: