📝 mkhtml makes HTML files using header/footer file and pages https://docs.rs/mkhtml/latest/mkhtmllib/
Find a file
2022-10-22 09:54:11 +02:00
src rewrote tests + 3.4.0 2022-10-22 09:54:11 +02:00
.gitignore mkhtml 2.0 - Rust 2022-06-01 17:54:36 +02:00
Cargo.lock rewrote tests + 3.4.0 2022-10-22 09:54:11 +02:00
Cargo.toml rewrote tests + 3.4.0 2022-10-22 09:54:11 +02:00
mkhtml.deprecated.sh mkhtml 2.0 - Rust 2022-06-01 17:54:36 +02:00
README.md update readme 2022-10-21 23:57:52 +02:00

mkhtml

Makes HTML files from header.html and footer.html and pages.

Installation

cargo install mkhtml
# !OR!
brew tap jusdepatate/jusdepatate
brew install mkhtml

Building

cargo build     # dev
cargo build -r  # release

Usage

As a binary

  • put your header in parts/header.html,
  • put your footer in parts/footer.html,
  • put your pages in pages/ (can have folders),
  • mkhtml build. (b also works).

Arguments

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).

As a library

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);
}