{"id":26201601,"url":"https://github.com/askama-rs/askama","last_synced_at":"2026-04-30T01:01:46.266Z","repository":{"id":244798627,"uuid":"816314127","full_name":"askama-rs/askama","owner":"askama-rs","description":"A template rendering engine based on Jinja, generating type-safe Rust code at compile time.","archived":false,"fork":false,"pushed_at":"2026-04-26T15:49:15.000Z","size":4215,"stargazers_count":1057,"open_issues_count":25,"forks_count":49,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-26T17:26:10.601Z","etag":null,"topics":["html","jinja","rust","template-engine"],"latest_commit_sha":null,"homepage":"https://askama.rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/askama-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-17T13:42:32.000Z","updated_at":"2026-04-26T17:19:03.000Z","dependencies_parsed_at":"2024-06-28T23:20:48.790Z","dependency_job_id":"9e282c1c-6d46-43a4-8a01-d76e36d480ad","html_url":"https://github.com/askama-rs/askama","commit_stats":null,"previous_names":["rinja-rs/rinja","askama-rs/askama"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/askama-rs/askama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askama-rs%2Faskama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askama-rs%2Faskama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askama-rs%2Faskama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askama-rs%2Faskama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/askama-rs","download_url":"https://codeload.github.com/askama-rs/askama/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askama-rs%2Faskama/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32450234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","jinja","rust","template-engine"],"created_at":"2025-03-12T03:05:22.217Z","updated_at":"2026-04-30T01:01:46.256Z","avatar_url":"https://github.com/askama-rs.png","language":"Rust","funding_links":[],"categories":["Recently Updated","Libraries"],"sub_categories":["[Mar 15, 2025](/content/2025/03/15/README.md)","Template engine"],"readme":"# askama\n\n[![Crates.io](https://img.shields.io/crates/v/askama?logo=rust\u0026style=flat-square\u0026logoColor=white \"Crates.io\")](https://crates.io/crates/askama)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/askama-rs/askama/rust.yml?branch=main\u0026logo=github\u0026style=flat-square\u0026logoColor=white \"GitHub Workflow Status\")](https://github.com/askama-rs/askama/actions/workflows/rust.yml)\n[![Book](https://img.shields.io/readthedocs/askama?label=book\u0026logo=readthedocs\u0026style=flat-square\u0026logoColor=white \"Book\")](https://askama.rs/)\n[![docs.rs](https://img.shields.io/docsrs/askama?logo=docsdotrs\u0026style=flat-square\u0026logoColor=white \"docs.rs\")](https://docs.rs/askama/)\n\n**Askama** implements a template rendering engine based on [Jinja](https://jinja.palletsprojects.com/),\nand generates type-safe Rust code from your templates at compile time\nbased on a user-defined `struct` to hold the template's context.\n\nAt some point, **Askama** got forked into **Rinja** (explained [here](https://blog.guillaume-gomez.fr/articles/2024-07-31+docs.rs+switching+jinja+template+framework+from+tera+to+rinja))\nbefore getting merged back into **Askama**.\n\nAll feedback welcome! Feel free to file bugs, requests for documentation and\nany other feedback to the [issue tracker][issues].\n\nYou can find the documentation about our syntax, features, configuration in our book:\n[askama.rs](https://askama.rs/).\n\nHave a look at our [*Askama Playground*](https://play.askama.rs/),\nif you want to try out askama's code generation online.\n\n### Feature highlights\n\n* Construct templates using a familiar, easy-to-use syntax\n* Benefit from the safety provided by Rust's type system\n* Template code is compiled into your crate for optimal performance\n* Debugging features to assist you in template development\n* Templates must be valid UTF-8 and produce UTF-8 when rendered\n* Works on stable Rust\n\n### Supported in templates\n\n* Template inheritance\n* Loops, if/else statements and include support\n* Macro support\n* Variables (no mutability allowed)\n* Some built-in filters, and the ability to use your own\n* Whitespace suppressing with '-' markers\n* Opt-out HTML escaping\n* Syntax customization\n\n[issues]: https://github.com/askama-rs/askama/issues\n\n\nHow to get started\n------------------\n\nFirst, add the askama dependency to your crate's `Cargo.toml`:\n\n```sh\ncargo add askama\n```\n\nNow create a directory called `templates` in your crate root.\nIn it, create a file called `hello.html`, containing the following:\n\n```jinja\nHello, {{ name }}!\n```\n\nIn any Rust file inside your crate, add the following:\n\n```rust\nuse askama::Template; // bring trait in scope\n\n#[derive(Template)] // this will generate the code...\n#[template(path = \"hello.html\")] // using the template in this path, relative\n                                 // to the `templates` dir in the crate root\nstruct HelloTemplate\u003c'a\u003e { // the name of the struct can be anything\n    name: \u0026'a str, // the field name should match the variable name\n                   // in your template\n}\n\nfn main() {\n    let hello = HelloTemplate { name: \"world\" }; // instantiate your struct\n    println!(\"{}\", hello.render().unwrap()); // then render it.\n}\n```\n\nYou should now be able to compile and run this code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskama-rs%2Faskama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faskama-rs%2Faskama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskama-rs%2Faskama/lists"}