public interface HandlebarsTemplateEngine extends TemplateEngine
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_CACHE_SIZE
Default max number of templates to cache
|
static String |
DEFAULT_TEMPLATE_EXTENSION
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static HandlebarsTemplateEngine |
create(Vertx vertx)
Create a template engine using defaults
|
com.github.jknack.handlebars.Handlebars |
getHandlebars()
Get a reference to the internal Handlebars object so it
can be configured.
|
com.github.jknack.handlebars.ValueResolver[] |
getResolvers()
Return the array of configured handlebars context value resolvers.
|
HandlebarsTemplateEngine |
setExtension(String extension)
Deprecated.
as a user you should use filename with extensions on the render method instead of relying
on this method to suffix your filenames. Using this method is quite an opinionated API and has the side
effect that you cannot use files without extensions as templates.
Set the extension for the engine
|
HandlebarsTemplateEngine |
setMaxCacheSize(int maxCacheSize)
Set the max cache size for the engine
|
HandlebarsTemplateEngine |
setResolvers(com.github.jknack.handlebars.ValueResolver... resolvers)
Set the array of handlebars context value resolvers.
|
isCachingEnabled, render, render
static final int DEFAULT_MAX_CACHE_SIZE
@Deprecated static final String DEFAULT_TEMPLATE_EXTENSION
static HandlebarsTemplateEngine create(Vertx vertx)
@Deprecated HandlebarsTemplateEngine setExtension(String extension)
extension
- the extensionHandlebarsTemplateEngine setMaxCacheSize(int maxCacheSize)
maxCacheSize
- the maxCacheSizecom.github.jknack.handlebars.Handlebars getHandlebars()
com.github.jknack.handlebars.ValueResolver[] getResolvers()
HandlebarsTemplateEngine setResolvers(com.github.jknack.handlebars.ValueResolver... resolvers)
resolvers
- the value resolvers to be usedCopyright © 2023 Eclipse. All rights reserved.