Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 11 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 (6 months ago)
- Last Synced: 2024-05-16T04:55:22.228Z (6 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
README
# Tera
[![Actions Status](https://github.com/Keats/tera/workflows/ci/badge.svg)](https://github.com/Keats/tera/actions)
[![Crates.io](https://img.shields.io/crates/v/tera.svg)](https://crates.io/crates/tera)
[![Docs](https://docs.rs/tera/badge.svg)](https://docs.rs/crate/tera/)
[![Gitter](https://badges.gitter.im/Tera-templates/community.svg)](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.