You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Qute is a templating engine designed specifically to meet the Quarkus needs.
14
-
The usage of reflection is minimized to reduce the size of native images.
13
+
Qute is a templating engine developed specifically for Quarkus.
14
+
Reflection usage is minimized to reduce the size of native images.
15
15
The API combines both the imperative and the non-blocking reactive style of coding.
16
-
In the development mode, all files located in `src/main/resources/templates` are watched for changes and modifications are immediately visible.
17
-
Furthermore, we try to detect most of the template problems at build time.
16
+
In development mode, all files located in `src/main/resources/templates` are monitored for changes, and modifications become visible immediately.
17
+
Furthermore, we aim to detect most template issues at build time.
18
18
In this guide, you will learn how to easily render templates in your application.
19
19
20
20
== Solution
@@ -65,7 +65,7 @@ Let's start with a Hello World template:
65
65
66
66
NOTE: Templates located in the `pub` directory are served via HTTP. This behavior is built-in, no controllers are needed. For example, the template `src/main/resources/templates/pub/foo.html` will be served from the paths `/foo` and `/foo.html` by default.
67
67
68
-
If your application is running, you can open your browser and hit: http://localhost:8080/hello?name=Martin
68
+
Once your application is running, you can open your browser and navigate to: http://localhost:8080/hello?name=Martin
69
69
70
70
For more information about Qute Web options, see the https://docs.quarkiverse.io/quarkus-qute-web/dev/index.html[Qute Web guide].
71
71
@@ -144,7 +144,7 @@ Hello Martin!
144
144
145
145
There's an alternate way to declare your templates in your Java code, which relies on the following convention:
146
146
147
-
- Organise your template files in the `/src/main/resources/templates` directory, by grouping them into one directory per resource class. So, if
147
+
- Organize your template files in the `/src/main/resources/templates` directory, by grouping them into one directory per resource class. So, if
148
148
your `ItemResource` class references two templates `hello` and `goodbye`, place them at `/src/main/resources/templates/ItemResource/hello.txt`
149
149
and `/src/main/resources/templates/ItemResource/goodbye.txt`. Grouping templates per resource class makes it easier to navigate to them.
150
150
- In each of your resource class, declare a `@CheckedTemplate static class Template {}` class within your resource class.
@@ -389,7 +389,7 @@ public class ItemResource {
389
389
*Template extension methods* are used to extend the set of accessible properties of data objects.
390
390
391
391
Sometimes, you're not in control of the classes that you want to use in your template, and you cannot add methods
392
-
to them. Template extension methods allows you to declare new method for those classes that will be available
392
+
to them. Template extension methods allow you to declare new methods for those classes that will be available
393
393
from your templates just as if they belonged to the target class.
394
394
395
395
Let's keep extending on our simple HTML page that contains the item name, price and add a discounted price.
@@ -442,7 +442,7 @@ grouped by target type, or in a single `TemplateExtensions` class by convention.
442
442
443
443
== Rendering Periodic Reports
444
444
445
-
Templating engine could be also very useful when rendering periodic reports.
445
+
The templating engine can also be very useful for rendering periodic reports.
446
446
You'll need to add the `quarkus-scheduler` and `quarkus-qute` extensions first.
0 commit comments