Show HN: I'm building HMPL – server-oriented templating for lightweight web-apps
2 aanthonymax 0 9/13/2025, 8:48:15 PM github.com ↗
I got tired of shipping megabytes of JS just to render small bits of dynamic UI.
So I built HMPL.js — a tiny (~24 KB) server-oriented templating language for JavaScript. It lets you send UI directly from the server with a simple block syntax, no framework overhead. Example:
<div> <button id="btn">Click!</button> Clicks: {{#request src="/api/clicks" after="click:#btn"}}{{/request}} </div>
It’s fetch-based (not XHR), supports events/forms, integrates JSON5, and sanitizes HTML via DOMPurify. Think of it as a smaller alternative to HTMX/Alpine.js when you just want server-driven interactivity with minimal JS.
Docs: hmpl-lang.dev
Would love feedback on where this could actually replace heavier setups ^ ^
No comments yet