HMPL
Lightweight HTML-centric templating language for building dynamic UI with minimal JavaScript.
HMPL (pronounced “Hample”) is a small, server-oriented template language that lets developers render dynamic user interfaces by embedding fetch-driven UI blocks directly in HTML.
It bridges the gap between simple server-rendered HTML and heavier client frameworks by enabling interactive content without large JavaScript bundles.
HMPL is syntactically object-based, integrates JSON5 and DOMPurify for safety and flexibility, and can be used directly in HTML or as part of build systems like Vite or Webpack.
Key features include:
- HTML-centric templating with server-fetched UI components
- Integration with modern build tools (Vite, Webpack)
- Optional use without heavy JavaScript frameworks
- Support for .hmpl file extensions with tooling
- Safety via DOMPurify sanitization and JSON5 support
Common use cases include lightweight interactive web pages, dynamic server-fetched components, and apps that want the simplicity of HTML with the flexibility of modern UI without full framework overhead.
HMPL is developed as an open-source project with documentation, starter templates, and tooling support.
Comments
0Markdown is supported.