Features
- #126 The specialized
@tagand@layoutkeywords have been removed in favor of@template. This change allows to structure template files freely. Templates can now live close to the place where they are used. For example:- Create high level module directories that contain all templates and are not scattered in tag/layout directories
- Split a large page in smaller templates that live next to that page
- #125 Added
@rawkeyword for output that is unprocessed by jte - #122 Faster directory watcher on MacOS
Migration Guide
#126 is a breaking change, the old @tag/@layout is no longer supported. If jte 2 finds those keywords during compilation it will fail and output instructions how to migrate your project automatically.
How to upgrade:
- Bump jte dependency to the latest 2.x release
- Compile your templates (either through maven, gradle or by simply opening your website locally)
- In case you use any of the removed keywords, the compiler will fail and output a Java class that does the migration
- Create a class with the migration code in your project and run the main method
- Make sure to upgrade the IntelliJ plugin to 2.x
Migration class, in case you want to migrate right away without the compile step:
public class Migration {
public static void main(String[] args) {
gg.jte.migrate.MigrateV1To2.migrateTemplates(java.nio.file.Paths.get("your jte source root directory"));
}
}IntelliJ plugin features
You also want to make sure to use the latest IntelliJ plugin to get support for the new syntax.
- Support for
@templatekeyword - Support for
@rawkeyword - Move template file refactoring is working now
IntelliJ can no longer guess the jte root directory by moving up the directory tree until a tag/layout directory is found. You will need to create a .jteroot file within the root directory to help the plugin here (the plugin will complain if this file doesn't exist).