Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

template-fragments for jinja-like engines

Usage with minijinja (see also examples/minijinja.rs):

use template_fragments::{join_path, split_templates};

let mut source = minijinja::Source::new();

for (path, template) in  [
    ("index.html", include_str!("templates/index.html")),
    ("users.html", include_str!("templates/users.html")),
] {
    for (fragment_name, template_fragment) in split_templates(template)? {
        source.add_template(join_path(path, &fragment_name), &template_fragment)?;
    }
}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages