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

[Question] How to preview a freemarker template on a browser? #100

Closed
waynemorphic opened this issue Jul 8, 2024 · 0 comments
Closed

[Question] How to preview a freemarker template on a browser? #100

waynemorphic opened this issue Jul 8, 2024 · 0 comments

Comments

@waynemorphic
Copy link

Problem

I am facing knowledge gaps in previewing a Freemarker template on a browser before deploying a theme as a JAR archive. For instance, if I have developed login-reset-otp.ftl template, how can I preview it on a browser without ideally building a jar archive and mounting it in a Keycloak docker container?

Assumption

I thought that Freemarker autogenerates the HTML files in the root folder but they seem separate. So, how do I generate an HTML file for login-reset-otp.ftl template? This follows issue #75

Note:

I have tried pnpm test but it fails with several errors, including:

FreeMarker template error:
The following has evaluated to null or missing:
==> realm.name  [in template "document.ftl" at line 28, column 71]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
@waynemorphic waynemorphic changed the title [Question] How to preview a freemarker template on a broswer? [Question] How to preview a freemarker template on a browser? Jul 15, 2024
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