mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 05:21:14 +00:00
30 lines
467 B
Rust
30 lines
467 B
Rust
use askama::Template;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = r#"
|
|
{% block bla %}
|
|
{% extends "bla.txt" %}
|
|
{% endblock %}
|
|
"#, ext = "txt")]
|
|
struct MyTemplate1;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = r#"
|
|
{% block bla %}
|
|
{% macro bla() %}
|
|
{% endmacro %}
|
|
{% endblock %}
|
|
"#, ext = "txt")]
|
|
struct MyTemplate2;
|
|
|
|
#[derive(Template)]
|
|
#[template(source = r#"
|
|
{% block bla %}
|
|
{% import "bla.txt" as blue %}
|
|
{% endblock %}
|
|
"#, ext = "txt")]
|
|
struct MyTemplate3;
|
|
|
|
fn main() {
|
|
}
|