Pebble is a java templating engine inspired by Twig

Overview

Pebble Continuous Integration

Pebble is a java templating engine inspired by Twig. It separates itself from the crowd with its inheritance feature and its easy-to-read syntax. It ships with built-in autoescaping for security, and it includes integrated support for internationalization.

For more information please visit the website.

Artifact id renaming for pebble-spring-boot-starter

As of version 3.1.0 and in order to follow this naming recommendation, the artifactId of pebble-spring-boot-starter has been renamed as is:

Old artifactId New artifactId spring-boot version
pebble-spring-boot-starter pebble-legacy-spring-boot-starter 1.5.x
pebble-spring-boot-2-starter pebble-spring-boot-starter 2.x.x

New group id

Please note that the pebble's groupId has been updated as of version 2.5.0


   
	
    
     io.pebbletemplates
    
	
    
     pebble
    
	
    
     3.1.5
    

   

License

Copyright (c) 2013 by Mitchell Bösecke

Some rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.

    * The names of the contributors may not be used to endorse or
      promote products derived from this software without specific
      prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Comments
  • Is it dying?

    Is it dying?

    Hi,

    I see no activities (interest) for this project in the last period of time? They are many PR and issues with no resolution or comment. @mbosecke Do you intent to continue working on this project? Any information from maintainers about the next steps/releases is very welcome.

    opened by decebals 36
  • Version 3 SNAPSHOT availability

    Version 3 SNAPSHOT availability

    Hi everyone,

    I just released a SNAPSHOT of next major version (3.0.0-SNAPSHOT) for both pebble and pebble-spring in the snapshot repository of sonatype. If anyone is interested in trying it, you can just add the following code in your pom.xml to retrieve SNAPSHOT versions

      <repositories>
        <repository>
          <id>sonatype-public</id>
          <name>Sonatype Public</name>
          <url>https://oss.sonatype.org/content/groups/public</url>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    

    After that, just change your pebble dependency to 3.0.0-SNAPSHOT

          <dependency>
            <groupId>io.pebbletemplates</groupId>
            <artifactId>pebble</artifactId>
            <version>3.0.0-SNAPSHOT</version>
          </dependency>
    

    Waiting for your comments on it !

    discussion 
    opened by ebussieres 23
  • Use Orchid to maintain documentation and landing page site

    Use Orchid to maintain documentation and landing page site

    Orchid is a tool I recently released which is perfect for managing the documentation of Java projects, and Pebble is the ideal candidate. Orchid itself uses Pebble as its primary template engine, so setting up Pebble with Orchid docs not only will improve the documentation as a whole, but also serve as a great example of what can be done with Pebble.

    This issue will track my progress getting Pebble set up with Orchid, and also serve as a discussion around the site.

    Progress

    • [x] Landing page(s)
    • [x] Full wiki, migrated from the current Github Wiki
    • [x] Auto-generated listings of/documentation for:
      • [x] Tags
      • [x] Filters
      • [x] Functions
      • [x] Tests
      • [x] Operators
    • [x] Complete Javadoc API documentation
    • [x] Changelog
      • [ ] Link to older versions of docs
    • [x] Automatic build/deploy from Travis CI to Github Pages
      • [x] Host each version's docs in a subfolder to maintain docs history

    Discussion Points

    • Orchid runs as a Gradle plugin, so using Orchid will require Pebble to either migrate from Maven to Gradle as its sole build system, or use both in the same project (Maven for normal build/test, Gradle for Orchid build). Alternatively, I would like to build a Maven plugin eventually but don't know how; if anyone has experience/would like to help out building a Maven Orchid plugin, we could continue using only Maven here
    • What should the site look like? Keep the theme used for the current docs, use a default Orchid theme, or find/create a new theme just for Pebble

    https://github.com/JavaEden/Orchid

    opened by cjbrooks12 20
  • Sets up Pebble documentation site using Orchid

    Sets up Pebble documentation site using Orchid

    This PR adds a new maven project in docs/ which will generate a documentation site and deploy it to Github Pages, using Orchid. The site includes a wiki (migrated from the current Github Wiki) and Javadocs documentation, and also includes a basic full-text search of site content. You can preview the site here. It's pretty basic overall, using one of the built-in themes, but I'm more than happy to make any changes as needed.

    Here's a brief rundown of the new functionality (will still need to be integrated into the current release process):

    Commands (run from docs/ directory)

    • mvn orchid:serve - build the site and serve it locally on http://localhost:8080. Changes to site content will rebuild the site.
    • mvn -Denvironment=prod orchid:deploy - build the site and deploy it to Github Pages. Requires an API token with push access to the repo, set as githubToken in the environment variables. The environment project property will optimize the build for production.

    Directory Structure

    • docs/src/orchid/resources - The main root for site content.
      • site/src/orchid/resources/pages - Arbitrary static pages
      • site/src/orchid/resources/wiki - A summary.md file in here declares the pages in the wiki, which are other files relative to this directory. They will automatically be linked to each other in the order they are defined in the summary file.
      • site/src/orchid/resources/homepage.md - The content for the front page of the site.
      • site/src/orchid/resources/config.yml - Configuration for things like site menus, and theme/plugin options.

    Deployment

    Orchid builds the site into the docs/target/docs/orchid directory. It has a publication mechanism in it to deploy to Github Pages after a successful build, which creates a temporary directory to do all the git stuff and shouldn't break anything when deploying. It's set up to clean out and force push to the branch, but it has options to maintain history, and also to push each version to a new subdirectory to maintain historical site versions if that is desired.

    I've never worked with Maven so I don't know if this is the correct way to set up the docs project, but everything's working great using the Orchid Maven plugin while in the docs/ directory. Huge thanks to @bjansen for creating the Maven plugin for this!

    opened by cjbrooks12 18
  • Asset Handling

    Asset Handling

    In a typical web scenario you want to add external resources (e.g. CSS, JavaScript etc.) to the produced output.

    For HTML5 all CSS resources should be placed within the 'head' tag. The JavaScript resources should be placed before the closing 'body' tag to improve the speed of the loading. Additionally those resources should be combined together into one file to reduce the number of HTTP requests to the server, because the browser is allowed only to open two connections per domain (see HTTP specification).

    Hence whats happening is typically all resources are manually combined and added to the template. But this is hard with twig since you will add more resources in other child templates. E.g. there is a base.twig from which all other templates extends. From a practical standpoint of view it would be easier when each sub template and included template can add new resources and the base.twig does not need to know anything about the additional resources. This way only those resources are included in the HTML page which are actually required and not all potential resources which eventually are required.

    We are currently implementing such a solution. Is there any interest that I create a pull request for this feature?

    opened by thomashunziker 16
  • Defining local scope variables in macros

    Defining local scope variables in macros

    Hello,

    When dealing with macros, sometimes we need to hold a value in variable to use it more than once.

    For example;

    {% macro toggleMacro(itemInfo) %}
    {% set productId = itemInfo.item.productId %}
    <input type="radio"
           class="select-radio hide"
           checked="true"
           value="{{ currentUnit }}"
           name="{{ 'unit_' + productId }}"/>
    {% endmacro %}
    

    but setting a new productId variable, will also override current productId variable if exists in context. I know it can be useful to reach all context, but I think we need to also support local variables.

    May be {% set local foo = bar %} for example?

    opened by okohub 14
  • Introduce a Cache abstraction

    Introduce a Cache abstraction

    Hi,

    Guava is a tricky dependency. Large projects can have multiple dependencies to libraries that depend on different Guava versions and cause conflicts.

    I see there's a plan to switch to Caffeine (great!) for Pebble 3.0, but I guess this means in a pretty far future.

    Instead, would you be interested in a contribution to introduce a cache abstraction, with Guava and Caffeine based implementations (Caffeine only being an optional dependency)? This way, Guava would still be the default, at least in Pebble 2, but users could prefer passing Caffeine based caches instead and exclude the Guava dependency.

    Please let me know.

    opened by slandelle 14
  • No newline after expression that is at end of the line

    No newline after expression that is at end of the line

    When an expression is at the end of a line, there seems to be no newline character to seperate that line with the next line.

    <html>
      <body>
        <div id="content">
          {{ mainContent }}
        </div>
      </body>
    </html>
    

    In the previous example, given that the mainContent variable will be replaced with "Hello, world", the output will be:

    <html>
      <body>
        <div id="content">
          Hello, world    </div>
      </body>
    </html>
    

    As you can see, there is no newline after "Hello, world". The </div> closing tag with its four spaces of indentation should be on the next line, not on the same line that "Hello, world" is on.

    3.0 pull request welcome 
    opened by dtaillard 14
  • Bean reflection doesn't check parent class

    Bean reflection doesn't check parent class

    I have a CompanyService with a method get(long id):Company, I injected the companyService in my template model and I I try something like this:

    {% for customer in customers %}
    <tr>
       <td>{{ companyService.get(customer.companyId) }}</td>
    </tr>
    {% endfor %}
    

    where Customer has a property Long companyId (my idea is to create a quick prototype of application without a fat CustomerDto that contains a Company). The result is an empty ("") string without any message in console. Any idea?

    opened by decebals 14
  • add a file extension that will be recognized as pebble

    add a file extension that will be recognized as pebble

    using pebble to generate non web files, would be useful to have an extension that could be used to also recognize as pebble, for example in intellij's plugin. This is more of a doc, spec, spread the word thing.

    opened by xenoterracide 13
  • Spring boot doesn't found RelaxedPropertyResolver

    Spring boot doesn't found RelaxedPropertyResolver

    I'm a new to pebble and I want to used it with spring boot so I follow this wiki guide: https://github.com/PebbleTemplates/pebble/wiki/spring-boot-integration

    I use this dependecy:

    <dependency>
        <groupId>io.pebbletemplates</groupId>
        <artifactId>pebble-spring-boot-starter</artifactId>
        <version>2.5.1</version>
    </dependency>
    

    Then place pebble templates(index.pebble) in /src/main/resources/templates Then make a controller:

    @Controller
    public class DemoController {
        
        @RequestMapping("/pebble")
        public String index(Model model){
            model.addAttribute("name", "John Doe");
            return "index";
        }
    }
    

    After running the app here's the error I got:

    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.pebbletry.demo.DemoApplication]; nested exception is java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration due to org/springframework/boot/bind/RelaxedPropertyResolver not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
    	at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:648) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassParser.lambda$processDeferredImportSelectors$2(ConfigurationClassParser.java:567) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_172]
    	at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:563) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:316) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at com.pebbletry.demo.DemoApplication.main(DemoApplication.java:10) [classes/:na]
    Caused by: java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration due to org/springframework/boot/bind/RelaxedPropertyResolver not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
    	at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:55) ~[spring-boot-autoconfigure-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:221) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:362) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:265) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:638) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
    	... 17 common frames omitted
    Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/bind/RelaxedPropertyResolver
    	at com.mitchellbosecke.pebble.boot.autoconfigure.PebbleTemplateAvailabilityProvider.isTemplateAvailable(PebbleTemplateAvailabilityProvider.java:16) ~[pebble-spring-boot-starter-2.5.1.jar:na]
    	at org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders.findProvider(TemplateAvailabilityProviders.java:158) ~[spring-boot-autoconfigure-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders.getProvider(TemplateAvailabilityProviders.java:145) ~[spring-boot-autoconfigure-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$ErrorTemplateMissingCondition.getMatchOutcome(ErrorMvcAutoConfiguration.java:194) ~[spring-boot-autoconfigure-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.0.2.RELEASE.jar:2.0.2.RELEASE]
    	... 23 common frames omitted
    Caused by: java.lang.ClassNotFoundException: org.springframework.boot.bind.RelaxedPropertyResolver
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_172]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_172]
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_172]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_172]
    	... 28 common frames omitted
    
    waiting-for-feedback question 
    opened by nullstrike 13
  • Error passing named arguments to macros when using named imports

    Error passing named arguments to macros when using named imports

    Given the following macro saved in the file forms.html:

    {% macro input(type="text") %}
        <input type="{{ type }}"  />
    {% endmacro %}
    

    If you import forms.html without assigning the import to a variable then using named arguments works fine, e.g:

    {% import "forms" %}
    {{ input(type="text") }}
    

    But if you import forms.html and set it as a variable then passing named arguments throws a ParserException with the message "Can not use named arguments when calling a bean method", e.g.

    {% import "forms" as forms %}
    {{ forms.input(type="text") }}
    
    opened by brettatoms 0
  • Vulnerability CVE-2022-37767

    Vulnerability CVE-2022-37767

    Hello,

    since this morning security checks in our projects are reporting new critical vulnerability in the current pebble version 3.1.5: NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-37767 Original report: https://github.com/Y4tacker/Web-Security/issues/3

    Any short-term workaround to mitigate the vulnerability?

    opened by pelece 36
  • [BUG] doesn't escape XXS inside embed block

    [BUG] doesn't escape XXS inside embed block

    inside embed block

    {% embed %}
    {% endembed %}
    

    even if the string inside the bracket is XXS code written in javascript, it doesn't escape and execute the script

    opened by Shane-Park 0
  • [Question] Is there a way to see all defined variables in a template?

    [Question] Is there a way to see all defined variables in a template?

    For example, I am adding userName to the model and I know I can access the value by {{ userName }} in my template. But I want to list all defined variables (keys) in a template like {{ _context.key }} {{ _context.value }} and see in my template something like userName: Jhon Doe.

    Is that possible? Or is there a way to see all defined variables in a template?

    opened by Zalimben 0
  • Allow html in evaluate parameters

    Allow html in evaluate parameters

    I am using pebble templates and it works perfectly. Easy setup and quick to go. I am running into 1 small issue. I want to pass html to 1 of my templates using parameters like this:

    pebbleTemplate.evaluate(writer, parameters);

    I am using pebble to create html emails and I want to allow breaklines (
    ) in my email. How can I pass html to a template and not have the < and > symbols escaped?

    Thanks in advance Martijn

    opened by martijnhiemstra 0
Releases(3.2.0)
  • 3.2.0(Nov 24, 2022)

    • Add support for spring framework 6 and spring-boot 3 (#630)
    • Bump minimum supported java version to 17 in pebble-spring6 and pebble-spring-boot-starter in order to work with spring (#630)
    • Add a memory loader that supports inheritance and doesn't require a filesystem. This is useful for applications that retrieve templates from a database for example (#617).
    • BREAKING CHANGE: Change default suffix to .peb instead of .pebble in spring boot autoconfiguration (#553)
    • BREAKING CHANGE: Rename method getInstance to createInstance in BinaryOperator interface (#521)
    • BREAKING CHANGE: Rename package from com.mitchellbosecke to io.pebbletemplates (#635)
    Source code(tar.gz)
    Source code(zip)
  • 3.1.6(Sep 21, 2022)

  • 3.1.5(Feb 12, 2021)

    • Add timeZone parameter to date filter (#530)
    • Add setting to limit the size of output when evaluating a template (#529)
    • Fix variable name starting with operator (#541)
    • Added Servlet5Loader to support Servlet 5.0 (#549)
    • Throw an error when an import alias references an invalid macro (#559)
    • Special for loop variables class, to support all attribute resolvers (#560)
    • Support all Java identifiers (#544)
    • Provide option to customize stock extensions (#552)
    • Cannot use sort filter right after split filter (#568)
    • Support array of List in sort filter (#569)
    • Extension global variables in macros (#571)
    • Add base64 and sha256 filters (#574)
    Source code(tar.gz)
    Source code(zip)
  • v3.1.4(May 28, 2020)

    • Slice filter: Use collection size when toIndex is greater than collection size (#504)
    • Adjust spring boot doc (#509)
    • Build with jdk14 (#508)
    • Set proxyBeanMethods to false and build with spring boot 2.3 (#507)
    • Add access to Spring Beans/request/session and response when using Pebble with WebFlux (#512)
    • Remove allowUnsafeMethods property and replace it with methodAccessValidator. Default one is BlacklistMethodAccessValidtor (#511)
    Source code(tar.gz)
    Source code(zip)
  • v3.1.3(May 1, 2020)

    • Allow treating all number literals as BigDecimals to avoid NumberFormatExceptions (#503)
    • Custom operator can't use external context (#497)
    • Allow all variable names to be retrieve from ScopeChain/Scope (#291)
    • Empty map in strict mode does not throw exception (#491)
    Source code(tar.gz)
    Source code(zip)
  • v3.1.2(Dec 13, 2019)

  • v3.1.1(Nov 15, 2019)

    • Use a list of unsafeMethods and rename allowGetClass to allowUnsafeMethods (#454)
    • PebbleTemplateAvailabilityProvider doesn't find template files from the classpath (#464)
    • Added inline verbatim description to Verbatim tag documentation (#422)
    • Fix issue of embed tag changing cached templates (#475)
    • Fixes bug which allowed sequential String literals to be parsed correctly (#482)
    • Update to spring boot 2.2 (486)
    Source code(tar.gz)
    Source code(zip)
  • v3.1.0(Aug 20, 2019)

    • BREAKING CHANGES: Consider avoiding feature version in spring boot starter name (#459)
    • Upgrade spring boot integration to Spring Boot 2.1 (#460)
    • Allow override core operators (#455, #456)
    • Allows variables to be set in templates when provided context is an immutable map (#453)
    • Fixed a few typos in the docs (#452)
    • Remove unnecessary variable 'state' in LexerImpl by using Stack (#450)
    • Updates Orchid to 0.17.1 and fixes its breaking changes (#448)
    • Null value in a Map should not throw AttributeNotFoundException (#447, #446)
    Source code(tar.gz)
    Source code(zip)
  • v3.0.10(May 30, 2019)

  • v3.0.9(Apr 29, 2019)

  • v3.0.8(Feb 10, 2019)

  • v3.0.7(Jan 6, 2019)

  • v3.0.6(Nov 11, 2018)

    • Check that parseNewVariableName() parses a valid identifier (#409)
    • Set up Pebble documentation site using Orchid (#411)
    • Add twig compatibility matrix documentation (#247)
    Source code(tar.gz)
    Source code(zip)
  • v3.0.5(Sep 30, 2018)

  • v3.0.4(Sep 9, 2018)

    • Make NOT operator more tolerant to argument type (#394)
    • Make ternary if operator more tolerant to argument type (#399)
    • Adjust AndExpression and OrExpression logic (#398)
    • Add JSON escaping as part of the default escaping strategies (#395)
    Source code(tar.gz)
    Source code(zip)
  • v3.0.3(Aug 26, 2018)

    • Support more expressions for if operator (#387)
    • Consider adding greedyMatchMethod to PebbleProperties (#388)
    • Use locale from context for lower/upper filter (#390)
    • Restore cache:invalidateAll method (#393)
    Source code(tar.gz)
    Source code(zip)
  • v3.0.2(Aug 11, 2018)

    • Add PebbleCache interface and use ConcurrentMap instead of Caffeine as default template/tag cache (#381)
    • Use unbescape instead of Coverity Escapers (#380)
    Source code(tar.gz)
    Source code(zip)
  • v3.0.1(Jul 26, 2018)

  • v3.0.0(Jul 13, 2018)

    • Java 8
    • Macros have access to all variables within the template and are no longer restricted to a "local scope"
    • New signature for filters/functions/tests that accepts the PebbleTemplate, EvaluationContext, and line number
    • Converted EvaluationContext to an interface with limited access to the underlying implementation
    • A "null" used as a boolean expression now throws an error if strict variables is true, treated as "false" otherwise
    • Improved error reporting
    • Java8 Date API support on date filter
    • Replace guava cache with caffeine
    • Add String Interpolation (#235)
    • Add the possibility to extend attribute access (#258)
    • Remove DynamicAttributeProvider
    • Render content on demand. Expose getLiteralTemplate(String templateName) (#295)
    • Introduce SpecializedWriter, (#358)
    • Many performance enhancements
    • Method resolution with overloaded method signatures (#367)
    • Use AbstractTemplateViewResolverProperties for spring-boot (#369)
    Source code(tar.gz)
    Source code(zip)
  • v2.6.2(Jun 30, 2018)

  • v3.0.0.BETA01(Jun 13, 2018)

    • Java 8
    • Macros have access to all variables within the template and are no longer restricted to a "local scope"
    • New signature for filters/functions/tests that accepts the PebbleTemplate, EvaluationContext, and line number
    • Converted EvaluationContext to an interface with limited access to the underlying implementation
    • A "null" used as a boolean expression now throws an error if strict variables is true, treated as "false" otherwise
    • Improved error reporting
    • Java8 Date API support on date filter
    • Replace guava cache with caffeine
    • Add String Interpolation (#235)
    • Add the possibility to extend attribute access (#258)
    • Remove DynamicAttributeProvider
    • Render content on demand. Expose getLiteralTemplate(String templateName) (#295)
    • Introduce SpecializedWriter, (#358)
    • Many performance enhancements
    Source code(tar.gz)
    Source code(zip)
  • v2.6.1(Jun 14, 2018)

  • v2.6.0(May 21, 2018)

    • Add support for 'as' and 'from' in import statement (#271)
    • Add support for spring-boot-2 (#340)
    • Supports empty collection for first filter (#342)
    • Add options for literal number types and method finding strategy (#268)
      • support L type suffix for literal number which will be treated as Long, such as '123L'.
      • Add literalDecimalTreatedAsInteger option for toggling to enable/disable literal decimal treated as integer.
      • Add 'greedyMatchMethod' option for toggling to enable/disable greedy matching mode for finding java method. Reduce the limit of the parameter type, try to find other method which has compatible parameter types.
    Source code(tar.gz)
    Source code(zip)
  • v2.5.1(May 5, 2018)

  • v2.5.0(May 2, 2018)

    • Handle all Iterables and Arrays in JoinFilter (#273)
    • Fix NPE in GetAttributeExpression (#299)
    • Remove redundant null check before calling operator "instanceof" in OperatorUtils. (#298)
    • Handle null values passed to an include statement (#283)
    • Fix performance regression issues (#326, #328)
    • Add Reverse filter (#315)
    • Make "loop.length" and "loop.revindex" be lazy evaluated (#279)
    • Fixed security issue which allowed to execute shell command by having access to Java's Class object. It is disabled by default but can be enabled in PebbleEngine Builder (#329)
    • Throw ParserException when endBlock not found (#308)
    • For tag : add enumeration support (#292)
    • Fix operator precedence (#290)
    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Apr 21, 2018)

    • Add arrays support for iterable test (#254)
    • Bugfix for variable which was accessible outside a loop (#250)
    • Syntax builder return itself for method chaining (#259)
    • Macros are called too often if included multiple times
    • Fix potential null pointer exception in PebbleException (#243)
    • Fix for accessing map via primitive (#196)
    • Output filename and line number of non-existent macro
    • Fix for null pointer and index out of bounds exceptions when invalid or no endif/endfor tags are used in template (#266)
    • Add DynamicAttributeProvider interface. When implemented by an object, tells the expression parser that this object is able to provide attributes dynamically, given their names and the potential arguments(#230)
    • Add rendering of single blocks, similar to the Twig renderBlock() method.
    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Apr 21, 2018)

    • Upgrade SLF4J from 1.6.1 to 1.7.21
    • "raw" filter works for all variables, not just strings
    • Improved error reporting for binary operators
    • Added setting to disable the trimming of newlines after pebble tags
    Source code(tar.gz)
    Source code(zip)
  • v2.2.3(Apr 21, 2018)

    • Bug fix: Fix the use of the "set" tag within a for loop
    • Bug fix: Fix the concatenation of SafeString (ex. the output of two macros)
    • Added misc getters to various internal nodes
    Source code(tar.gz)
    Source code(zip)
  • v2.2.2(Apr 21, 2018)

  • v2.2.1(Apr 21, 2018)

    • Security Fix: Pebble was only escaping Strings; now it escapes the toString() output of all objects
    • Official spring4 extension
    • Official spring boot starter
    • Bug fix: ConcurrentModificationException when importing macros in nested parallel blocks
    • Bug fix: Exceptions in parallel blocks were being swallowed
    • Bug fix: Obtaining a dynamic attribute of a variable was being incorrectly cached
    • Improved error reporting
    Source code(tar.gz)
    Source code(zip)
Java 8 optimized, memory efficient, speedy template engine producing statically typed, plain java objects

Rocker Templates by Fizzed Fizzed, Inc. (Follow on Twitter: @fizzed_inc) Sponsored by Rocker is proudly sponsored by Greenback. We love the service an

Fizzed, Inc. 669 Dec 29, 2022
jte is a secure and lightweight template engine for Java.

jte is a secure and lightweight template engine for Java. All jte templates are compiled to Java class files, meaning jte adds essentially zero overhe

Andreas Hager 457 Dec 22, 2022
Java modern template engine

Jtwig Project Documentation Project Status Coverage Version jtwig-reflection jtwig-core jtwig-web jtwig-pluralization jtwig-spring jtwig-translate-ext

Jtwig 298 May 19, 2022
ST (StringTemplate) is a java template engine (with ports for C#, Python, and Objective-C coming) for generating source code

ST (StringTemplate) is a java template engine (with ports for C#, Python, and Objective-C coming) for generating source code, web pages, emails, or an

Antlr Project 851 Jan 5, 2023
a pug implementation written in Java (formerly known as jade)

Attention: jade4j is now pug4j In alignment with the javascript template engine we renamed jade4j to pug4j. You will find it under https://github.com/

neuland - Büro für Informatik 700 Oct 16, 2022
Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.

An open source rule engine, DMN engine and complex event processing (CEP) engine for Java™ and the JVM Platform. Drools is a business rule management

KIE (Drools, OptaPlanner and jBPM) 4.9k Dec 31, 2022
A 3D graphics engine created in Java. The project was inspired by javidx9's series on YouTube.

3D Graphics Engine A 3D graphics engine created in Java. The project was inspired by javidx9's series on YouTube. Installation Clone this repository o

Farhan Towhid 17 Sep 16, 2022
Te4j (Template Engine For Java) - Fastest and easy template engine

Te4j About the project Te4j (Template Engine For Java) - Fastest and easy template engine Pros Extremely fast (127k renders per second on 4790K) Easy

Lero4ka16 19 Nov 11, 2022
Arbitrary test data generator for parameterized tests in Java inspired by AutoFixture.

AutoParams AutoParams is an arbitrary test data generator for parameterized tests in Java inspired by AutoFixture. Sometimes setting all the test data

null 260 Jan 2, 2023
a reverse proxy load balancer using Java. Inspired by Nginx.

Project Outline: Project Main coding reverse proxy support configuration adding unit test works on Websocket Stress Test compared to Nginx load balanc

Feng 12 Aug 5, 2022
A BDD-style test runner for Java 8. Inspired by Jasmine, RSpec, and Cucumber.

Spectrum A colorful BDD-style test runner for Java Spectrum is inspired by the behavior-driven testing frameworks Jasmine and RSpec, bringing their ex

Greg Haskins 143 Nov 22, 2022
Storm - a fast, easy to use, no-bullshit opinionated Java ORM inspired by Doctrine

A stupidly simple Java/MySQL ORM with native Hikaricp and Redis cache support supporting MariaDB and Sqlite

Mats 18 Dec 1, 2022
Yet another Java annotation-based command parsing library, with Dependency Injection inspired by Guice

Commander A universal java command parsing library Building This project uses Gradle. Clone this repository: git clone https://github.com/OctoPvP/Comm

OctoDev 4 Oct 2, 2022
Lightweight React Native UI Components inspired on Vant

vant-react-native Install yarn add vant-react-native Or npm install vant-react-native Usage import React, { Component } from 'react'; import { View, T

洛竹 51 Sep 29, 2022
Simple, fast Key-Value storage. Inspired by HaloDB

Phantom Introduction Phantom is an embedded key-value store, provides extreme high write throughput while maintains low latency data access. Phantom w

null 11 Apr 14, 2022
Aliucord - Discord Android app mod inspired by desktop Discord client mods.

Aliucord Aliucord is a modification for the Android Discord app inspired by desktop client modifications. Unlike other Android Discord app modificatio

null 2k Dec 31, 2022
DnD Plugin submission using Atlas. Plugin inspired on the TrollGUI bukkit plugin

?? PunishGUI DnD Plugin submission using Atlas. Plugin inspired on the TrollGUI bukkit plugin ?? Dependencies ?? Paper 1.18 ?? Atlas ?? Commands /hell

null 1 Jan 19, 2022
Minecraft Fabric mod for Stardew Valley-inspired hotbar swapping.

HotbarSwap Minecraft Fabric mod for Stardew Valley-inspired hotbar swapping. Developed for 1.18.1. Features Adds 2 keybinds: Swap Hotbar (Default: H):

null 6 Sep 19, 2022
A word game inspired by the original Wordle to run in the command line.

Wordle This is a word game inspired by the original Wordle to run in the command line. It can be played in english or in spanish. How to run it Open a

null 37 Dec 17, 2022