Replies: 1 comment
-
Hey @danicc097 We've gone back and forth a few times on this and landed on a focus of HTML at the moment. See #385 (comment) I think there is demand and a gap in the Go ecosystem for a non-HTML templ, because we have had a few requests and questions around it. I agree that it would be a great way to do go codegen, but as of now it's not a goal of templ, we want to get HTML right for now :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been experimenting a bit to replace stdlib go templates with templ for go codegen (not html). The potential is huge but there are some drawbacks I quickly found:
templ.Raw( ... )
everywhere and no syntax highlighting like with html.So in short:
.templ
files could be used for both the extension and thetempl generate
to handle go codegen properly (no escaping fortempl generate
, syntax change in IDE...). This would also open the door to having explicit support to generate other types of files, not justgo|html
(none come to mind now though)Beta Was this translation helpful? Give feedback.
All reactions