Skip to content

gitblit/pippo-pebble-emoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pippo-pebble-emoji

an emoji filter for Pebble and Pippo

This requires Pippo >= 0.7.0-SNAPSHOT.

Add the dependency.

<dependency>
    <groupId>com.gitblit.pippo</groupId>
    <artifactId>pippo-pebble-emoji</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>

Make sure you added a PublicResourceHandler.

Pippo pippo = new Pippo();
pippo.getApplication().addPublicResourceRoute();

Register the filter in your custom template engine.

public class MyEngine extends PebbleTemplateEngine {

    @Override
    protected void init(Application application, PebbleEngine engine) {
        engine.addExtension(new EmojiExtension(application.getRouter()));
    }
}

Register your custom template engine.

Pippo pippo = new Pippo();
pippo.getApplication().setTemplateEngine(new MyTemplateEngine());

Use the filter.

{{ ":coffee: Java is my favorite language!" | emoji | raw }}
{{ ":coffee: Java is my favorite language!" | emoji('cssclass') | raw }}    
{{ ":coffee: Java is my favorite language!" | emoji(fixed=true) | raw }}
{{ ":coffee: Java is my favorite language!" | emoji(inline=true) | raw }}

About

an emoji filter for Pebble and Pippo

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE-IMAGES.md

Stars

Watchers

Forks

Packages

No packages published