WebBooks/wbb — pull request #19 by mathbruyen (2013-02-11 18:48:20+00:00)
Title: Generates chapters list from Book.txt

I had issues when generating HTML output and not strictly following the `chapter_X.md` file name: it actually took everything from the chapters directory (standard glob expansion).

Thus I tried a different approach for generating HTML output: read the `Book.txt` file to dynamically generate the list of files. My first idea was to put the list of chapters directly in `grunt.js` and generating `Book.txt` from there, but I thought it would make merges more difficult when users pull a new version.

There are things I am not sure about:
* I guess using that trick for leanpub generation is not required
* I tried setting `chapters` in config and then referencing it with ``, but it did not work (I guess grunt is expanding that at init time)

I do not say the approach I took is clean, any comment welcome!