Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 6b0f5e8

Browse files
committed
Archive the repository
1 parent 704f8f1 commit 6b0f5e8

File tree

296 files changed

+5
-20405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

296 files changed

+5
-20405
lines changed

Cargo.toml

-24
This file was deleted.

README.md

+5-90
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,9 @@
11
# Askama
22

3-
[![Documentation](https://docs.rs/askama/badge.svg)](https://docs.rs/askama/)
4-
[![Latest version](https://img.shields.io/crates/v/askama.svg)](https://crates.io/crates/askama)
5-
[![Build Status](https://github.com/djc/askama/workflows/CI/badge.svg)](https://github.com/djc/askama/actions?query=workflow%3ACI)
6-
[![Chat](https://img.shields.io/discord/976380008299917365?logo=discord)](https://discord.gg/ZucwjE6bmT)
3+
[![Crates.io](https://img.shields.io/crates/v/askama?logo=rust&style=flat-square&logoColor=white "Crates.io")](https://crates.io/crates/askama)
4+
[![Book](https://img.shields.io/readthedocs/askama?label=book&logo=readthedocs&style=flat-square&logoColor=white "Book")](https://askama.readthedocs.io/)
5+
[![docs.rs](https://img.shields.io/docsrs/askama?logo=docsdotrs&style=flat-square&logoColor=white "docs.rs")](https://docs.rs/askama/)
76

8-
Askama implements a template rendering engine based on [Jinja](https://jinja.palletsprojects.com/).
9-
It generates Rust code from your templates at compile time
10-
based on a user-defined `struct` to hold the template's context.
11-
See below for an example, or read [the book][docs].
7+
This is the old repository of the [askama](https://crates.io/crates/askama) project.
128

13-
**"Pretty exciting. I would love to use this already."** --
14-
[Armin Ronacher][mitsuhiko], creator of Jinja
15-
16-
All feedback welcome. Feel free to file bugs, requests for documentation and
17-
any other feedback to the [issue tracker][issues] or [tweet me][twitter].
18-
19-
Askama was created by and is maintained by Dirkjan Ochtman. If you are in a
20-
position to support ongoing maintenance and further development or use it
21-
in a for-profit context, please consider supporting my open source work on
22-
[Patreon][patreon].
23-
24-
### Feature highlights
25-
26-
* Construct templates using a familiar, easy-to-use syntax
27-
* Benefit from the safety provided by Rust's type system
28-
* Template code is compiled into your crate for [optimal performance][benchmarks]
29-
* Optional built-in support for Actix, Axum, Rocket, and warp web frameworks
30-
* Debugging features to assist you in template development
31-
* Templates must be valid UTF-8 and produce UTF-8 when rendered
32-
* IDE support available in [JetBrains products](https://plugins.jetbrains.com/plugin/16591-askama-template-support)
33-
* Works on stable Rust
34-
35-
### Supported in templates
36-
37-
* Template inheritance
38-
* Loops, if/else statements and include support
39-
* Macro support
40-
* Variables (no mutability allowed)
41-
* Some built-in filters, and the ability to use your own
42-
* Whitespace suppressing with '-' markers
43-
* Opt-out HTML escaping
44-
* Syntax customization
45-
46-
[docs]: https://djc.github.io/askama/
47-
[fafhrd91]: https://github.com/fafhrd91
48-
[mitsuhiko]: http://lucumr.pocoo.org/
49-
[issues]: https://github.com/djc/askama/issues
50-
[twitter]: https://twitter.com/djco/
51-
[patreon]: https://www.patreon.com/dochtman
52-
[benchmarks]: https://github.com/djc/template-benchmarks-rs
53-
54-
55-
How to get started
56-
------------------
57-
58-
First, add the Askama dependency to your crate's `Cargo.toml`:
59-
60-
```sh
61-
cargo add askama
62-
```
63-
64-
Now create a directory called `templates` in your crate root.
65-
In it, create a file called `hello.html`, containing the following:
66-
67-
```
68-
Hello, {{ name }}!
69-
```
70-
71-
In any Rust file inside your crate, add the following:
72-
73-
```rust
74-
use askama::Template; // bring trait in scope
75-
76-
#[derive(Template)] // this will generate the code...
77-
#[template(path = "hello.html")] // using the template in this path, relative
78-
// to the `templates` dir in the crate root
79-
struct HelloTemplate<'a> { // the name of the struct can be anything
80-
name: &'a str, // the field name should match the variable name
81-
// in your template
82-
}
83-
84-
fn main() {
85-
let hello = HelloTemplate { name: "world" }; // instantiate your struct
86-
println!("{}", hello.render().unwrap()); // then render it.
87-
}
88-
```
89-
90-
You should now be able to compile and run this code.
91-
92-
Review the [test cases] for more examples.
93-
94-
[test cases]: https://github.com/djc/askama/tree/main/testing
9+
Please go to **<https://github.com/askama-rs/askama>** to see the current state of the project.

askama/Cargo.toml

-50
This file was deleted.

askama/LICENSE-APACHE

-1
This file was deleted.

askama/LICENSE-MIT

-1
This file was deleted.

askama/benches/to-json.rs

-83
This file was deleted.

askama/src/error.rs

-89
This file was deleted.

0 commit comments

Comments
 (0)