Lindenii Project Forge
Login

go-htmpl

Simple HTML templating engine

/README.md (raw)

# go-htmpl – A simple HTML templating engine

This is a Go port of the HTML templating engine used in
[Got](https://got.gameoftrees.org/?action=summary&path=got.git)
and described in
[Omar Polo's blog post](https://www.omarpolo.com/post/template.html).

The `gogohtmplgen` program generates a Go file from the template file.

Each template is presented as a function that accepts an
`net/http.ResponseWriter` and other user-defined parameters, if any.

## Dependencies

- [Go](https://go.dev)
- A POSIX-compatible Yacc implementation, such as
  [Bison](https://www.gnu.org/software/bison/)
- A C compiler

## 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](https://forge.lindenii.runxiyu.org/hare/:/repos/go-htmpl/)
via SSH directly.

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

## Support

[`#chat`](https://webirc.runxiyu.org/kiwiirc/#chat)
on
[irc.runxiyu.org](https://irc.runxiyu.org/).