#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

#122 in #html-templating

Download history 87/week @ 2024-09-29 31/week @ 2024-10-06 10/week @ 2024-10-13 1/week @ 2024-10-20

129 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