https://github.com/Keats/tera
A template engine for Rust based on Jinja2/Django
https://github.com/Keats/tera
django jinja2 rust-library template-engine
Last synced: 25 days ago
JSON representation
A template engine for Rust based on Jinja2/Django
- Host: GitHub
- URL: https://github.com/Keats/tera
- Owner: Keats
- License: mit
- Created: 2015-07-17T19:40:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-02T18:35:21.000Z (12 months ago)
- Last Synced: 2024-05-16T04:55:22.228Z (11 months ago)
- Topics: django, jinja2, rust-library, template-engine
- Language: Rust
- Homepage: http://keats.github.io/tera/
- Size: 1.86 MB
- Stars: 3,241
- Watchers: 24
- Forks: 274
- Open Issues: 166
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-cn - Keats/tera - ci.org/Keats/tera.svg?branch=master">](https://travis-ci.org/Keats/tera) (Libraries / Template engine)
- awesome-rust - Keats/tera - ci.org/Keats/tera.svg?branch=master">](https://travis-ci.org/Keats/tera) (Libraries / Template engine)
- awesome-rust - Keats/tera
- awesome-rust-cn - Keats/tera
- awesome-starred - Keats/tera - A template engine for Rust based on Jinja2/Django (django)
- awesome-pest - tera - A template engine for Rust based on Jinja2/Django. (Projects)
- awesome-rust-zh - Keats/tera - 模板引擎,基于 jinja2 和 django 模板语言。[<img src="https://api.travis-ci.org/Keats/tera.svg?branch=master">](https://travis-ci.org/Keats/tera) (库 / 模板引擎)
- trackawesomelist - Keats/tera (⭐3.7k) - template engine based on Jinja2 and the Django template language. [](https://github.com/Keats/tera/actions) (Recently Updated / [Mar 15, 2025](/content/2025/03/15/README.md))
README
# Tera
[](https://github.com/Keats/tera/actions)
[](https://crates.io/crates/tera)
[](https://docs.rs/crate/tera/)
[](https://gitter.im/Tera-templates/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)Tera is a template engine inspired by [Jinja2](http://jinja.pocoo.org/) and the [Django template language](https://docs.djangoproject.com/en/3.1/topics/templates/).
```jinja2
{% block title %}{% endblock title %}
- {{ user.username }}
{% for user in users %}
{% endfor %}
```
It does not aim to be 100% compatible with them but has many of the Jinja2/Django filters and testers.
## Documentation
API documentation is available on [docs.rs](https://docs.rs/crate/tera/).
Tera documentation is available on its [site](http://keats.github.io/tera/docs).
## SemVer
This project follows SemVer only for the public API, public API here meaning functions appearing in the docs.
Some features, like accessing the AST, are also available but breaking changes in them can happen in any versions.