{#========================================== Spincast Pebble plugin ==========================================#} {% extends "../../layout.html" %} {% block sectionClasses %}plugins hasBreadCrumb plugins-spincast-pebble{% endblock %} {% block meta_title %}Plugins - Spincast Pebble{% endblock %} {% block meta_description %}Spincast Pebble plugin provides templating functionalities using Pebble.{% endblock %} {% block scripts %} {% endblock %} {% block body %}

Overview

This plugin provides an implementation of the TemplatingEngine interface : SpincastPebbleTemplatingEngine. It is based on Pebble.

Make sure you read the Templating Engine section for more information about the templating functionnalities. Of course the Pebble documentation may also be very useful.

Installation

If you use the spincast-default artifact, this plugin is already installed so you have nothing more to do!

If you start from scratch using the spincast-core artifact, you can use the plugin by adding this artifact to your project:

<dependency>
    <groupId>org.spincast</groupId>
    <artifactId>spincast-plugins-pebble</artifactId>
    <version>{{spincast.spincastCurrrentVersion}}</version>
</dependency>

You then install the plugin's Guice module, by passing it to the Guice.createInjector(...) method:

Injector guice = Guice.createInjector(
        new SpincastCoreGuiceModule(args),
        new SpincastPebblePluginGuiceModule(AppRequestContext.class, AppWebsocketContext.class)
        // other modules...
        );

... or by using the install(...) method from your custom Guice module:

public class AppModule extends SpincastCoreGuiceModule {

    @Override
    protected void configure() {
        super.configure();
        install(new SpincastPebblePluginGuiceModule(getRequestContextType(), 
                                                    getWebsocketContextType()));
        // other modules...
    }
    
    // ...
}

Javadoc

Configuration

You can bind a SpincastPebbleTemplatingEngineConfig implementation to tweak the default configurations used by this plugin. By default, the SpincastPebbleTemplatingEngineConfigDefault class is used as the implementation.

{% endblock %}