Skip to content

Commit

Permalink
dos: move jte-extension-api to /docs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospereira committed Oct 14, 2023
1 parent fce7903 commit ed7d2e8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
27 changes: 27 additions & 0 deletions docs/jte-extension-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: jte-extension-api
description: A jte module that defines the interface to add extensions to jte generation.
---

# jte-extension-api

This module defines the interface to add extensions to jte generation. Extensions can generate additional files based on metadata about jte templates.

## Writing an Extension

Extension authors must implement the `gg.jte.extension.api.JteExtension` interface.
The implementing class must have a no-argument constructor so that it can be instantiated by name.

## Testing

The companion module `jte-extension-api-mocks` provides mock implementations of the API interfaces to help with writing unit tests.

## Usage

The jte Maven and Gradle plugins allow configuring extensions.

## Examples

* [jte-models](jte-models.md) module is an extension that generates typesafe facades for templates.
* [test/jte-runtime-cp-test-models](https://github.com/casid/jte/tree/{{ POM_VERSION }}/test/jte-runtime-cp-test-models) uses the Maven plugin to apply the jte-models extension.
* [test/jte-runtime-cp-test-models-gradle](https://github.com/casid/jte/tree/{{ POM_VERSION }}/test/jte-runtime-cp-test-models-gradle) uses the Gradle plugin to apply the jte-models extension.
22 changes: 1 addition & 21 deletions jte-extension-api/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# jte-extension-api

This module defines the interface to add extensions to jte generation.
Extensions can generate additional files based on metadata about jte templates.

## Writing an Extension

Extension authors must implement the `JteExtension` interface.
The implementing class must have a no-argument constructor so that it can be instantiated by name.

## Testing

The companion module jte-extension-api-mocks provides mock implementations of the API interfaces to help with writing unit tests.

## Usage

The jte Maven and Gradle plugins allow configuring extensions.

## Examples

* jte-models module is an extension that generates typesafe facades for templates.
* test/jte-runtime-cp-test-models uses the Maven plugin to apply the jte-models extension.
* test/jte-runtime-cp-test-models-gradle uses the Gradle plugin to apply the jte-models extension.
See official docs: <https://jte.gg/latest/jte-extension-api/>.
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ nav:
- "Rendering a Template": rendering-a-template.md
- "Templates Syntax": syntax.md
- "HTML Rendering": html-rendering.md
- "Configurations":
- "How To":
- "Hot Reloading": hot-reloading.md
- "Precompiling Templates": pre-compiling.md
- "Binary Rendering": binary-rendering.md
- "Localization": localization.md
- "jte-models Facade Generator": jte-models.md
- "Extensions API": jte-extension-api.md
- "Spring Boot Support":
- "Spring Boot Starter 3": spring-boot-starter-3.md
- "Spring Boot Starter 2": spring-boot-starter-2.md
Expand Down

0 comments on commit ed7d2e8

Please sign in to comment.