Convert Gollum (markdown) wiki to PDF

1.1k Views Asked by At

We have a wiki written in Markdown served up by Gollum. We'd like to PDF the current state of the wiki to make a "book".

All the files are .md on disk, or they can be browsed via HTTP/HTML. Is there a tool that can recursively traverse the wiki or filesystem and turn the markdown or HTML into a PDF? Preserving lists would be great.

1

There are 1 best solutions below

0
On

Handling the links is the tricky part. You could easily feed all the files into pandoc to get a single pdf (if you give it multiple files it will concatenate them), but I don't know how it will handle inter-page links. Possibly you could fix this using a combination of generated tags and a combination of the -A, -B and/or -H flags.