Add real world examples
legout opened this issue · comments
Volker L. commented
Hi,
Adding some more advanced examples would be nice.
- How does it play together with web frameworks like sanic, flask or fastapi?
- How can I replace jinja2 with html5tagger
- Does it work with htmx?
Thanks :-)
L. Kärkkäinen commented
Sanic documentation for this is pending. But in short, you just return sanic.response.html(doc) and other frameworks probably work similarly (convert to string first if it doesn't).
Jinja2 is a more complicated matter. Rewrite all your HTML and Jinja2 loops in html5tagger and Python, remove all your escaping (as this is done automatically by html5tagger).
HTMX attributes work as usual, just use underscores instead of hyphens.
Volker L. commented
Great. I’ll give it a try. Thanks.