Shtola is a library for generic file processing. It enables you to build your own applications that function as static site generators! Here's an example:
``` rust use shtola::{Shtola, Plugin, IR, ShFile}; use std::path::PathBuf;
fn plugin() -> Plugin {
Box::new(|ir: IR| {
// Let's create a hash where we store updated files...
let updatehash: HashMap
let mut s = Shtola::new(); s.source("mysource"); s.destination("mydestination") s.use(plugin()); s.build().expect("Build failed!"); // Now we have a "current_time.txt" file in our destination directory that // contains "12:30"! ```
Add the latest version of Shtola to your Cargo.toml
.
See https://docs.rs/shtola.