Skip to content

itedya/plt_macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-like Templating

Usage:

fn main() {
    plt_template!(some_template;r#"
        <!DOCTYPE html>
        <html>
        <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width" />
        <title><?= title ?></title>
        </head>
        <body>
            <?rs for i in 0..10 { ?>
                <?= body ?>
            <?rs } ?>
        </body>
        </html>
    "#;title: &str, body: &str);

    let response = some_template("this is a title", "some body").unwrap();
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages