tera icon indicating copy to clipboard operation
tera copied to clipboard

Other use cases besides static site generators?

Open TomzBench opened this issue 9 months ago • 3 comments

I notice all the rust template libraries seem to target generating HTML and static site generators. But I am wondering if there are any users of this library for code generation? IE: generating C code? I'm sure its possible but im wondering how popular this use case is? If so, perhaps the docs can expand the examples to include other use cases besides site generation.

It might also be the case that this library is not appropriate for anything but static site generating use cases, in which case tera can then make that more clear. For example, some of the "built in" filters, assume HTML markup (linebreakbr, striptags, etc)

(I would have preferred to open up a discussion but that feature is not enabled!)

TomzBench avatar Mar 14 '25 12:03 TomzBench

I use it in https://github.com/Keats/kickstart as well where you can template everything pretty much, including filenames

Keats avatar Mar 14 '25 12:03 Keats

very cool. The built in HTML stuff kind of triggers me a bit when i was evaluation libraries so I had to ask! Perhaps a showcase section or something can alleviate some pet peeves from OCD types like myself! :)

TomzBench avatar Mar 14 '25 13:03 TomzBench

I use it to render HTML files, but not for website display, rather for documents that are then rendered as PDF files by a browser via a webdriver call.

The idea behind is to go from structured files (i.e. JSON documents) to PDF documents, and first stage is based on Tera to get the input data be disposed in a semantic, style-able format.

ojob avatar Oct 30 '25 09:10 ojob