Lindenii Project Forge
Login

hare-htmpl

HTML templating engine for Hare

ssh://forge.lindenii.org/hare/-/repos/hare-htmpl

Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.

c371fe0a — Runxi Yu 2025-09-17 01:06:24
Add runtime dependencies to the README
c9a95372 — Runxi Yu 2025-09-17 01:00:39
Reformat C files
7b7ca5ce — Runxi Yu 2025-09-17 00:58:13
Use the ev::-based HTTP server

hare-htmpl – A simple HTML templating engine

This is a Hare port of the HTML templating engine used in Got and described in Omar Polo's blog post.

The htmplgen program generates a Hare file from the template file.

The htmpl module provides auxiliary functions used by the generated Hare code, and must be installed for the generated code to compile.

Each template is presented as a function that accepts an io::handle and other user-defined parameters, if any. The template writes to that io::handle; this allows for a variety of output backends (i.e. you could use a memio/bufio stream, or write to an actual file/socket/pipe socket, etc.)

Repository migration notice

The primary repository has been migrated onto the Lindenii Project's forge.

Dependencies

Dependencies for the example program

License

This inherits the ISC license from the original code. See the LICENSE file.

Contributing

Create a branch that begins with contrib/ and push to the main repo via SSH directly.

git clone ssh://forge.lindenii.runxiyu.org/hare/:/repos/hare-htmpl/
cd hare-htmpl
git checkout -b contrib/whatever
# edit and commit stuff
git push -u origin HEAD

Support

#chat on irc.runxiyu.org.