#html #html-templating #template #generate #query #text #name

htmpl

htmpl is a library for generating HTML files from HTML templates

1 unstable release

0.0.1 Oct 4, 2024

#141 in #html-templating

MIT license

37KB
830 lines

htmpl: HTML templating in HTML

htmpl is a library for generating HTML files from HTML templates.

<htmpl-query name="posts">SELECT title, text, draft FROM posts;</htmpl-query>
<htmpl-foreach query="posts">
    <h1>
        <htmpl-insert query="posts(title)"></htmpl-insert>
        <htmpl-if true="posts(draft)"> (Draft)</htmpl-if></h1>
    <p><htmpl-insert query="posts(text)"></htmpl-insert></p>
</htmpl-foreach>

See the documentation (src/lib.md) for more details.

Dependencies

~30MB
~496K SLoC