Function compile

Source
pub fn compile(source: &str, dest: &str, webroot: &str) -> Result<(), Error>
Expand description

Processes all files in source and places the results into the dir in dest. source can be either a file or a directory, but dest must only be a directory. Processing means that all #include comments in the source html are replaced with the file specified in the comment. Processing will not replace #placeholder comments, as these are mean to be replaced dynamically each time the file is requested.

ยงExamples

fn main() {
    htmlprep::compile("/var/www/staging", "/var/www/prod", "/");
    // All files in staging will be copied to prod
}