You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kchan/build.rs

15 lines
392 B
Rust

use std::fs::{read_to_string, write};
use comrak::{markdown_to_html, ComrakOptions};
fn main() {
let mut skeleton = read_to_string("src/skeleton.html").unwrap();
let readme = read_to_string("README.md").unwrap();
skeleton = skeleton
.replace("{name}", "readme")
.replace("{}", &markdown_to_html(&readme, &ComrakOptions::default()));
write("src/readme.html", skeleton).unwrap();
}