Helpful trick for the days when you need to put each chapter on a separate page and still have a working Table of Contents & preserve links to images.<p>The key idea is that epub is simply a zipped static website.<p>It's like 3 lines of bash:<p>```bash
pandoc -s "$FILE" -t epub --epub-chapter-level=2 -o all.epub
unzip -q "all.epub" -d . && rm "all.epub"
mv EPUB/nav.xhtml EPUB/index.html
```