Or just generate the HTML yourself. One page? So...
# ktor
k
Or just generate the HTML yourself. One page? Sounds like a lot of work for something trivial...
b
You mean a bunch of printlns? That's a bit too horrible even for me 😂
g
Not println, just raw string with placeholders, join them to string builders and then write to output.
b
Yeah that's what I meant, but this will be messy and hard to maintain
g
I used template libraries before and they for sure provide nice features, but imo well structured own template is not bad (keep logic and templates separately, extract different UI to own sub templates/functions)
So it may be not messy and probably even easier to maintain, because you have compile time checks and IDE support, I would just give chance to it
Do you have any example of template that you want to have?
Also kotlinx.html is completely type safe, more than any template
b
(the first line is a mistake, it should be
html
, not
p
)
k
String builder concat? 😂 Don't see anything super complicated enough for a template if it's just a single page. 🤷