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=false
to thejbake.properties
file. You can also delete theindex.html
template to keep things tidy. - Create a template for the homepage (e.g.
home.html.ftl
) in thetemplates
directory. Define this template in thejbake.properties
file (e.g.template.home.file = home.html.ftl
). This template will receive acontent
model and can therefore make use ofcontent.body
. - Create an content file named
index
in thecontent
directory (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.