Skip to content

Commit

Permalink
docs: update doc to reflect Java 17 support
Browse files Browse the repository at this point in the history
  • Loading branch information
edgar-espina-wpp committed Mar 4, 2024
1 parent d09b3c8 commit 0864c16
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ pom.xml.versionsBackup
jacoco.exec

out
tmp
tmp
tmp/spotless
53 changes: 6 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Handlebars provides the power necessary to let you build semantic templates effe

# Requirements

- Handlebars 4.3+ requires Java 8 or higher.
- Handlebars 4.4+ requires Java 17 or higher.
- Handlebars 4.3+ requires Java 8 or higher (NOT MAINTAINED).


# Getting Started
Expand Down Expand Up @@ -61,9 +62,9 @@ Hello {{this}}!
```

```java
Handlebars handlebars = new Handlebars();
var handlebars = new Handlebars();

Template template = handlebars.compile("mytemplate");
var template = handlebars.compile("mytemplate");

System.out.println(template.apply("Handlebars.java"));
```
Expand Down Expand Up @@ -885,57 +886,16 @@ escapeHTML: True, if the JSON content contains HTML chars and you need to escape

pretty: True, if the JSON content must be formatted. Default is: false.

## Jackson 2.x

Maven:
```xml
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-jackson2</artifactId>
<version>${handlebars-version}</version>
</dependency>
```

Same as Jackson1.x, except for the name of the helper: ```Jackson2Helper```

## Markdown

Maven:
```xml
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-markdown</artifactId>
<version>${handlebars-version}</version>
</dependency>
```
Usage:

```java
handlebars.registerHelper("md", new MarkdownHelper());
```
```
{{md context}}
```
context: An object or null. Required.

## Humanize
## Jackson

Maven:
```xml
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-humanize</artifactId>
<artifactId>handlebars-jackson</artifactId>
<version>${handlebars-version}</version>
</dependency>
```
Usage:

```java
// Register all the humanize helpers.
HumanizeHelper.register(handlebars);
```

See the JavaDoc of the [HumanizeHelper] (https://github.com/jknack/handlebars.java/blob/master/handlebars-humanize/src/main/java/com/github/jknack/handlebars/HumanizeHelper.java) for more information.

## SpringMVC

Expand Down Expand Up @@ -1063,7 +1023,6 @@ Hello {{#child}}{{this.value}}{{/child}}
* [Handlebars.js](http://handlebarsjs.com/)
* [Try Handlebars.js](http://tryhandlebarsjs.com/)
* [Mustache](http://mustache.github.io/)
* [Humanize](https://github.com/mfornos/humanize)
* [ANTLRv4](http://www.antlr.org/)

## Author
Expand Down
1 change: 0 additions & 1 deletion tmp/spotless

This file was deleted.

0 comments on commit 0864c16

Please sign in to comment.