With Sphinx-doc, you can create a bunch of ReStructureText files, with an index.rst
file which includes a table of contents macro that auto generates a table of contents from the other included files, and a conf.py
that acts as a compilation config. You can then compile the lot into a single python-doc-style site, complete with index, navigation tools, and a search function.
Is there any comparable tool for markdown (preferably pandoc-style markdown)?
Pandoc, the GNU make and sed commands, sprinkled with some CSS are all you need to fully automate the creation of a static website starting from Markdown.
Pandoc offers three command line options which can provide navigation between pages as well as the creation of a table of contents (TOC) based on the headings inside the page. With CSS you can make the navigation and TOC look and behave the way you want.
As a matter of fact, my personal website is built this way. Check out its makefile for more details. It is all free-libre open-source licensed under the GNU GPL version 3.
If you're OK not using Pandoc, mkdocs would seem to fit your needs.
If you definitely want to use Pandoc-flavoured Markdown, you could check out pdsite. I wrote it as a way to get mkdocs-style site generation with more input formats (like emacs org-mode) and without the Python dependencies - you pass in a folder of Markdown files and get out an HTML site (including automatically-generated multi-level navigation links). It's similar to Serge Stroobandt's approach in that it's just a shell script (it does require you to have
tree
installed however). Unfortunately it doesn't have a search function yet, although that wouldn't be too hard to add...Some static site generators that work with Markdown:
I think none of them use pandoc (maybe because it's written in Haskell), but they all use an enhanced Markdown syntax or can be configured to use pandoc.
Other interesting ways to generate a site from markdown:
Engines that use Pandoc:
The definitive listing of Static Site Generators
A good overview of static site generators: http://staticsitegenerators.net/