#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

#134 in #html-templating

34 downloads per month

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