Package org.jbake.template
Class ThymeleafTemplateEngine
- java.lang.Object
-
- org.jbake.template.AbstractTemplateEngine
-
- org.jbake.template.ThymeleafTemplateEngine
-
public class ThymeleafTemplateEngine extends AbstractTemplateEngine
A template engine which renders pages using Thymeleaf.
This template engine is not recommended for large sites because the whole model is loaded into memory due to Thymeleaf internal limitations.
The default rendering mode is "HTML", but it is possible to use another mode for each document type, by adding a key in the configuration, for example:
template.feed.thymeleaf.mode=XML
-
-
Field Summary
-
Fields inherited from class org.jbake.template.AbstractTemplateEngine
config, db, extractors
-
-
Constructor Summary
Constructors Constructor Description ThymeleafTemplateEngine(org.apache.commons.configuration2.CompositeConfiguration config, ContentStore db, java.io.File destination, java.io.File templatesPath)Deprecated.ThymeleafTemplateEngine(JBakeConfiguration config, ContentStore db)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrenderDocument(TemplateModel model, java.lang.String templateName, java.io.Writer writer)
-
-
-
Constructor Detail
-
ThymeleafTemplateEngine
@Deprecated public ThymeleafTemplateEngine(org.apache.commons.configuration2.CompositeConfiguration config, ContentStore db, java.io.File destination, java.io.File templatesPath)Deprecated.- Parameters:
config- theCompositeConfigurationof jbakedb- theContentStoredestination- the destination pathtemplatesPath- the templates path
-
ThymeleafTemplateEngine
public ThymeleafTemplateEngine(JBakeConfiguration config, ContentStore db)
-
-
Method Detail
-
renderDocument
public void renderDocument(TemplateModel model, java.lang.String templateName, java.io.Writer writer)
- Specified by:
renderDocumentin classAbstractTemplateEngine
-
-