Skip to content

Commit

Permalink
docs: use predictable heading ids
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospereira committed Apr 4, 2024
1 parent 8ed71bd commit 07a7ab7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/html-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Will render this HTML:

jte does not render HTML, CSS and JavaScript comments. You can use the natural comment syntax without worrying about leaking information/data to the outside.

## HTML Escaping
## HTML Escaping { #html-escaping }

Output escaping depends on the [`gg.jte.ContentType`](https://www.javadoc.io/doc/gg.jte/jte-runtime/{{ latest-git-tag }}/gg.jte.runtime/gg/jte/ContentType.html) the engine is created with:

Expand Down
2 changes: 1 addition & 1 deletion docs/jte-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Run the build to generate classes.

!!! tip "Maven configuration"

See details about how to fully configure the extension in the [Maven plugin documentation](maven-plugin.md#ggjtemodelsgeneratormodelextension).
See details about how to fully configure the extension in the [Maven plugin documentation](maven-plugin.md#model-extension).

## Output

Expand Down
20 changes: 10 additions & 10 deletions docs/maven-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jte provides a [Maven Plugin][jte-maven-compiler-plugin] that you can integrate

The plugin provides two goals:

## `precompile` goal
## `precompile` goal { #precompile-goal }

See [Precompiling Templates](pre-compiling.md) for more information. To use and configure this goal, you would use:

Expand All @@ -36,7 +36,7 @@ See [Precompiling Templates](pre-compiling.md) for more information. To use and
</plugin>
```

### Configurations
### Configurations { #precompile-configurations }

The default phase for this goal is `process-classes`, and it accepts the following configuration options:

Expand Down Expand Up @@ -91,7 +91,7 @@ The default phase for this goal is `process-classes`, and it accepts the followi

The `precompile` goal cleans the directory containing the compiled template classes every time it runs. In your local development environment, it may make more sense to use [hot reloading](hot-reloading.md).

## `generate` goal
## `generate` goal { #generate-goal }

This goal generates all template classes in a sources directory. This only generates `.java` files, not `.class` files.

Expand All @@ -115,7 +115,7 @@ This goal generates all template classes in a sources directory. This only gener
</plugin>
```

### Configurations
### Configurations { #generate-configurations }

The default phase for this goal is `generate-sources`, and it accepts the following configuration options:

Expand All @@ -132,15 +132,15 @@ The default phase for this goal is `generate-sources`, and it accepts the follow
| `targetResourceDirectory` | Directory in which to generate non-java files (resources) | None |
| `extensions` | Extensions this template engine should load | None |

### Extensions
### Extensions { #generate-extensions }

Currently, the following extensions exist:

#### `gg.jte.models.generator.ModelExtension`
#### `gg.jte.models.generator.ModelExtension` { #model-extension }

See details about it in the [jte-models documentation](jte-models.md).

##### Parameters
##### Parameters { #model-extension-parameters }

The following parameters are available for this extension:

Expand All @@ -152,7 +152,7 @@ The following parameters are available for this extension:
| `includePattern` | A regular expression to only include certain templates | None |
| `excludePattern` | A regular expression to exclude certain templates | None |

##### Example
##### Example { #model-extension-example }

```xml linenums="1"
<plugin>
Expand Down Expand Up @@ -186,11 +186,11 @@ The following parameters are available for this extension:
</plugin>
```

#### `gg.jte.nativeimage.NativeResourcesExtension`
#### `gg.jte.nativeimage.NativeResourcesExtension` { #native-resources-extension }

See details about it in the [native-image documentation](pre-compiling.md#graalvm-native-image-support). This extension requires no parameters.

##### Example
##### Example { #native-resources-extension-example }

```xml linenums="1"
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions docs/pre-compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,15 @@ The [Gradle plugin][jte-gradle-plugin] can generate all templates during the Gra
}
```

## GraalVM native-image support
## GraalVM native-image support { #graalvm-native-image-support }

!!! info "Version note"

Available since jte ^^**1.10.0**^^.

An application jar with generated classes can be built into a native binary using [GraalVM native-image](https://www.graalvm.org/reference-manual/native-image/). To support this, jte can generate the necessary configuration files to tell `native-image` about classes loaded by reflection.

To see how to use this feature in a Maven project, check out the [Maven plugin documentation](maven-plugin.md#ggjtenativeimagenativeresourcesextension).
To see how to use this feature in a Maven project, check out the [Maven plugin documentation](maven-plugin.md#native-resources-extension).

To use this feature, set `#!groovy jteExtension("gg.jte.nativeimage.NativeResourcesExtension")` in your Gradle `jte` block.

Expand Down

0 comments on commit 07a7ab7

Please sign in to comment.