{"slug": "templ", "name": "Templ", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 5, "commenters": 10, "warners": 0, "score": 5.703, "rising": -0.31, "first": "2025-11-27", "latest": "2026-10-06", "why": "I pair it with a-h/templ for a bit more type safety on the template, components and partials.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 5, "neutral": 3, "compare": 1, "warn": 1}, "spark": [1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "I pair it with a-h/templ for a bit more type safety on the template, components and partials.", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/a-h/templ", "official_url": "https://templ.guide", "pricing": "", "aliases": ["Templ", "templ"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 795098082, "item_id": 49693630, "url": "https://news.ycombinator.com/item?id=49693630", "by": "romshark", "date": "2026-09-14", "version": null, "stance": "recommend", "quote": "Datastar + Templ + Go is a highly effective combination.", "excerpt": "A Datastar metaframework for Go: https://github.com/romshark/datapages it's a CLI toolchain with a code generator and linter. I invested time into this because: 1. Go is a much less wasteful SSR solution than JavaScript. 2. Datastar + Templ + Go is a highly effective combination. 3. I wanted a set of tools that not only helps getting started with a project fast, but also allows me to make it easier to maintain, espec", "context": "", "use_case": "HTML templating in Go", "switched_from": "", "story": "Ask HN: What are you working on? (September 2026)"}, {"id": 782618177, "item_id": 48913636, "url": "https://news.ycombinator.com/item?id=48913636", "by": "nzoschke", "date": "2026-07-14", "version": null, "stance": "recommend", "quote": "I pair it with a-h/templ for a bit more type safety on the template, components and partials.", "excerpt": "Love Go + HTMX. I pair it with a-h/templ for a bit more type safety on the template, components and partials. I just shared my whole toolkit too [1], I call it the \"GUS stack\" -- Go, Unix, SQLite. Inspired heavily by the exe.dev \"GUTS\" stack [2] but with HTMX instead of Typescript. Some other Go components in the kit... - cockroachdb/errors for errors with stack traces - templ for type-safe HTML templates (with htmx ", "context": "", "use_case": "", "switched_from": "", "story": "How I use HTMX with Go"}, {"id": 769035873, "item_id": 48064742, "url": "https://news.ycombinator.com/item?id=48064742", "by": "librasteve", "date": "2026-05-08", "version": null, "stance": "recommend", "quote": "so Go + Templ + HTMX (aka the GOTH stack)", "excerpt": "For web stuff, I enjoy https://htmx.org so Go + Templ + HTMX (aka the GOTH stack) Or, if you prefer more of a power tools feel, then HTMX and Raku in functional style (https://harcstack.org) maybe to your liking. Which I call the Crotch Rocket of the programming world.", "context": "", "use_case": "", "switched_from": "", "story": "Just Fucking Use Go"}, {"id": 737222784, "item_id": 46076424, "url": "https://news.ycombinator.com/item?id=46076424", "by": "matt_callmann", "date": "2025-11-27", "version": null, "stance": "recommend", "quote": "Try using it with Templ and server-side rendering (SSR)", "excerpt": "I'll give it a try, but I'm not a fan of the SPA approach. Try using it with Templ and server-side rendering (SSR) instead of any JavaScript framework. If anyone has already done this and can share their experience, I would love to hear about it!", "context": "", "use_case": "server-side rendering with PocketBase", "switched_from": "", "story": "Pocketbase \u2013 open-source realtime back end in 1 file"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 780532720, "item_id": 48783295, "url": "https://news.ycombinator.com/item?id=48783295", "by": "jackielii", "date": "2026-07-04", "version": null, "stance": "warn", "quote": "Templ tries to stay simple, but it sacrificies ergonomics for simplicity and verbosity.", "excerpt": "Templ tries to stay simple, but it sacrificies ergonomics for simplicity and verbosity. Over the years, there are many proposals: inline elements, HTML tags, error hoisting. It's hard to retrofit into it. Beside the above, I also tried solving the all the ergonomics problem I saw when using templ. E.g. auto class merging, easy javascript interpolation within attributes. Auto json interpolation etc References: - HTML-", "context": "", "use_case": "", "switched_from": "", "story": "Gsx: JSX-Like Template for Go"}]}], "who": [{"by": "Imustaskforhelp", "context": "18-year-old developer", "url": "https://news.ycombinator.com/item?id=49981023", "date": "2026-10-06"}], "tags": [], "use_cases": ["go html templating", "html templating in go", "type-safe go templates", "server-side rendering with pocketbase"], "compared": [{"slug": "htmx", "name": "htmx", "co": 5, "switched_from": 0, "switched_to": 0}, {"slug": "sqlite", "name": "SQLite", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=48912175", "title": "How I use HTMX with Go", "mentions": 3}, {"url": "https://news.ycombinator.com/item?id=49979306", "title": "Vibecoding isn't as fun as writing code by hand", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49686380", "title": "Ask HN: What are you working on? (September 2026)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48777376", "title": "Gsx: JSX-Like Template for Go", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48062997", "title": "Just Fucking Use Go", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47715658", "title": "Show HN: Go language extension with HTML templates", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1}, "2025-12": {"neutral": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {"neutral": 1}, "2026-04": {"compare": 1}, "2026-05": {"recommend": 1}, "2026-06": {}, "2026-07": {"warn": 1, "recommend": 2}, "2026-08": {}, "2026-09": {"recommend": 1}, "2026-10": {"neutral": 1}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 799696369, "item_id": 49981023, "url": "https://news.ycombinator.com/item?id=49981023", "by": "Imustaskforhelp", "date": "2026-10-06", "version": null, "stance": "neutral", "quote": "create me a golang web application which uses htmx/templ/modernc sqlite about XYZ", "excerpt": "(I am currently 18 so you have actually been coding since more than two times my whole lifetime so y'know there's that.) I wish to ask you for some feedback and clarity and further concrete resources because I feel a little confused/lost regarding the whole vibe-coding situation, I wish to say thanks in general though as nonetheless your comment finally made me concretely express all the nuances brewing in my stomach", "context": "18-year-old developer", "use_case": "Go HTML templating", "switched_from": "", "story": "Vibecoding isn't as fun as writing code by hand"}, {"id": 795098082, "item_id": 49693630, "url": "https://news.ycombinator.com/item?id=49693630", "by": "romshark", "date": "2026-09-14", "version": null, "stance": "recommend", "quote": "Datastar + Templ + Go is a highly effective combination.", "excerpt": "A Datastar metaframework for Go: https://github.com/romshark/datapages it's a CLI toolchain with a code generator and linter. I invested time into this because: 1. Go is a much less wasteful SSR solution than JavaScript. 2. Datastar + Templ + Go is a highly effective combination. 3. I wanted a set of tools that not only helps getting started with a project fast, but also allows me to make it easier to maintain, espec", "context": "", "use_case": "HTML templating in Go", "switched_from": "", "story": "Ask HN: What are you working on? (September 2026)"}, {"id": 782689602, "item_id": 48918100, "url": "https://news.ycombinator.com/item?id=48918100", "by": "jackielii", "date": "2026-07-15", "version": null, "stance": "compare", "quote": "Templ is great, but the ergonomics is not great.", "excerpt": "Exactly the same thing happen to me: https://www.reddit.com/r/htmx/s/DuXyGgsCWK I'm in a advisor position, and I tried very hard to mentor the team, explaining that learning this technology deepens your understanding of the browser. Whereas React etc isolates you from the actual environment you're working in - the browser. On html/template, I like the security by default, and obviously it's built-in. But the dynamicn", "context": "", "use_case": "Go HTML templating", "switched_from": "", "story": "How I use HTMX with Go"}, {"id": 782657008, "item_id": 48916063, "url": "https://news.ycombinator.com/item?id=48916063", "by": "sollniss", "date": "2026-07-14", "version": null, "stance": "recommend", "quote": "", "excerpt": "Lately I'm really liking jet[1] for typesafe SQL. It requires a live DB to generate the code, but I see that as a positive as well, since you are forced to apply migrations before writing code. [1] https://github.com/go-jet/jet", "context": "", "use_case": "type-safe Go templates", "switched_from": "", "story": "How I use HTMX with Go"}, {"id": 782618177, "item_id": 48913636, "url": "https://news.ycombinator.com/item?id=48913636", "by": "nzoschke", "date": "2026-07-14", "version": null, "stance": "recommend", "quote": "I pair it with a-h/templ for a bit more type safety on the template, components and partials.", "excerpt": "Love Go + HTMX. I pair it with a-h/templ for a bit more type safety on the template, components and partials. I just shared my whole toolkit too [1], I call it the \"GUS stack\" -- Go, Unix, SQLite. Inspired heavily by the exe.dev \"GUTS\" stack [2] but with HTMX instead of Typescript. Some other Go components in the kit... - cockroachdb/errors for errors with stack traces - templ for type-safe HTML templates (with htmx ", "context": "", "use_case": "", "switched_from": "", "story": "How I use HTMX with Go"}, {"id": 780532720, "item_id": 48783295, "url": "https://news.ycombinator.com/item?id=48783295", "by": "jackielii", "date": "2026-07-04", "version": null, "stance": "warn", "quote": "Templ tries to stay simple, but it sacrificies ergonomics for simplicity and verbosity.", "excerpt": "Templ tries to stay simple, but it sacrificies ergonomics for simplicity and verbosity. Over the years, there are many proposals: inline elements, HTML tags, error hoisting. It's hard to retrofit into it. Beside the above, I also tried solving the all the ergonomics problem I saw when using templ. E.g. auto class merging, easy javascript interpolation within attributes. Auto json interpolation etc References: - HTML-", "context": "", "use_case": "", "switched_from": "", "story": "Gsx: JSX-Like Template for Go"}, {"id": 769035873, "item_id": 48064742, "url": "https://news.ycombinator.com/item?id=48064742", "by": "librasteve", "date": "2026-05-08", "version": null, "stance": "recommend", "quote": "so Go + Templ + HTMX (aka the GOTH stack)", "excerpt": "For web stuff, I enjoy https://htmx.org so Go + Templ + HTMX (aka the GOTH stack) Or, if you prefer more of a power tools feel, then HTMX and Raku in functional style (https://harcstack.org) maybe to your liking. Which I call the Crotch Rocket of the programming world.", "context": "", "use_case": "", "switched_from": "", "story": "Just Fucking Use Go"}, {"id": 763480657, "item_id": 47717541, "url": "https://news.ycombinator.com/item?id=47717541", "by": "derstruct", "date": "2026-04-10", "version": null, "stance": "compare", "quote": "5-10x LOC less then templ, but it's difficult to compare because  structure differences", "excerpt": "Actually with tree-sitter it's much less moving parts inside parser-generator core (5-10x LOC less then templ, but it's difficult to compare because structure differences). My theory that I don't have to care a lot about gopls changes, because I rely on LSP protocol itself when doing conversion. I basically scan exchange JSONs for locations (sometimes recursively) that are related to `.gox` or generated `.x.go` and p", "context": "author of a Go HTML template extension", "use_case": "Go HTML templating", "switched_from": "", "story": "Show HN: Go language extension with HTML templates"}, {"id": 759929952, "item_id": 47495622, "url": "https://news.ycombinator.com/item?id=47495622", "by": "riclib", "date": "2026-03-23", "version": null, "stance": "neutral", "quote": "the website is just using go standard library and templ", "excerpt": "the website is just using go standard library and templ. the voice is grok tts. the images are generate by nano banana from prompts written by claude, according to styles. it is all generated by a program called lg: https://yagnipedia.com/wiki/lg the blog pages are markdown on disk, generated dynamically for each request, cached by cloudflare.", "context": "", "use_case": "Go HTML templating", "switched_from": "", "story": "Why I Vibe in Go, Not Rust or Python"}, {"id": 740296737, "item_id": 46268546, "url": "https://news.ycombinator.com/item?id=46268546", "by": "l0gicpath", "date": "2025-12-14", "version": null, "stance": "neutral", "quote": "Uses Go, Templ, and Mithril.js", "excerpt": "It started out as a take-home assignment for a job I\u2019m interviewing for (they asked for about 10% of what I ended up implementing but I wanted to do/show more :). It\u2019s an aggregator for crypto exchange data. The app reads the public data stream from exchanges, handles the nitty, gritty details of each exchange\u2019s websocket connections, deals with its quirks, cleans up and normalizes the data into a uniform structure (", "context": "", "use_case": "", "switched_from": "", "story": "Ask HN: What Are You Working On? (December 2025)"}, {"id": 737222784, "item_id": 46076424, "url": "https://news.ycombinator.com/item?id=46076424", "by": "matt_callmann", "date": "2025-11-27", "version": null, "stance": "recommend", "quote": "Try using it with Templ and server-side rendering (SSR)", "excerpt": "I'll give it a try, but I'm not a fan of the SPA approach. Try using it with Templ and server-side rendering (SSR) instead of any JavaScript framework. If anyone has already done this and can share their experience, I would love to hear about it!", "context": "", "use_case": "server-side rendering with PocketBase", "switched_from": "", "story": "Pocketbase \u2013 open-source realtime back end in 1 file"}]}