Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent default behavior of Jte renderer #23

Open
dzikoysk opened this issue Jul 27, 2023 · 0 comments
Open

Inconsistent default behavior of Jte renderer #23

dzikoysk opened this issue Jul 27, 2023 · 0 comments

Comments

@dzikoysk
Copy link
Member

As stated in the official rendering plugin docs, the default location of templates for each implementation is "src/resources/templates" directory.

This is not the case for Jte implementation:

private fun defaultJteEngine() = TemplateEngine.create(DirectoryCodeResolver(File("src/main/jte").toPath()), ContentType.Html)

The default behavior of the Jte impl is to search in the ./src/main/jte directory, so it won't load templates from app resources & it won't work by default, if you'll override working directory for your process. The default impl should use this engine:

TemplateEngine.create(ResourceCodeResolver("templates"), ContentType.Html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant