Crates.io | mkhtml |
lib.rs | mkhtml |
version | 3.4.0 |
source | src |
created_at | 2022-06-01 15:58:46.466446 |
updated_at | 2022-10-22 07:54:43.896923 |
description | A tool that builds static websites |
homepage | https://github.com/jusdepatate/mkhtml |
repository | https://github.com/jusdepatate/mkhtml |
max_upload_size | |
id | 598263 |
size | 20,799 |
Makes HTML files from header.html
and footer.html
and pages
.
cargo install mkhtml
# !OR!
brew tap jusdepatate/jusdepatate
brew install mkhtml
cargo build # dev
cargo build -r # release
parts/header.html
,parts/footer.html
,pages/
(can have folders),mkhtml build
. (b
also works).By default mkhtml
will build in the working directory but you can change that by using any of the following arguments:
--pages-dir [path]
,--parts-dir [path]
,--static-dir [path]
,--build-dir [path]
.(you can use one or more of them, you can use both absolute and relative paths).
Basic example:
extern crate mkhtmllib;
use mkhtmllib::{mkhtml, Config};
fn main() {
let mut c = Config::new();
c.set_pages_dir("path/".to_string());
mkhtml(c);
}