How does pandoc compare to grip? I often need to render Markdown to PDF and find Grip is _ok_ but not great, and if I'm not mistaken it renders Github-side, where I'd prefer offline.
markdown -> docx (pandoc)
docx -> kindle (calibre)
I use both pandoc and calibre as offline CLIs, and the resulting kindle book has a nicely formatted table of contents with correct chapter markers, etc.