JBake
Overview
JBake is a static website generator written in Java.
Templates can be written in the following languages:
- FreeMarker
- Thymeleaf
- Jade
- Pebble
- Groovy SimpleTemplate
- Groovy XmlTemplate
- Groovy MarkupTemplate
Contents can be written in the following formats:
- Markdown
- AsciiDoc
- HTML
Tips
A more flexible homepage
JBake generates a homepage that uses the index template. If you’d rather use a content file for the homepage (e.g. to use a markup language other than HTML), you can follow the following instructions:
- Disable the default homepage generation by adding
render.index=falseto thejbake.propertiesfile. You can also delete theindex.htmltemplate to keep things tidy. - Create a template for the homepage (e.g.
home.html.ftl) in thetemplatesdirectory. Define this template in thejbake.propertiesfile (e.g.template.home.file = home.html.ftl). This template will receive acontentmodel and can therefore make use ofcontent.body. - Create an content file named
indexin thecontentdirectory (e.g.index.md). In its front matter, set its type to the name of the template (e.g.type=home).
JBake will now process the new template with the content file. As the file generated is named index.html, it will be used as homepage.