configureFreemarker();
}
public void generate(Book book, File directory) throws IOException {
ResourceManipulatorFactory htmlResourceManipulatorFactory = new HtmlResourceManipulatorFactory();
TubainaHtmlDir bookRoot = new TubainaHtmlIO(templateDir, htmlResourceManipulatorFactory)
.createTubainaDir(directory, book);
List<String> dirTree = createDirTree(book, directory);
StringBuffer toc = new BookToTOC().generateTOC(book, cfg, dirTree, parser);
bookRoot.writeIndex(fixPaths(toc));