https://github.com/bc1bb/mkhtml
📝 mkhtml makes HTML files using header/footer file and pages
https://github.com/bc1bb/mkhtml
bash html rust rust-crate rust-lang
Last synced: 4 months ago
JSON representation
📝 mkhtml makes HTML files using header/footer file and pages
- Host: GitHub
- URL: https://github.com/bc1bb/mkhtml
- Owner: bc1bb
- Created: 2020-05-17T16:18:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-22T07:56:37.000Z (over 3 years ago)
- Last Synced: 2026-01-14T11:39:07.736Z (5 months ago)
- Topics: bash, html, rust, rust-crate, rust-lang
- Language: Rust
- Homepage: https://docs.rs/mkhtml/latest/mkhtmllib/
- Size: 46.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mkhtml
Makes HTML files from `header.html` and `footer.html` and `pages`.
## Installation
```shell
cargo install mkhtml
# !OR!
brew tap jusdepatate/jusdepatate
brew install mkhtml
```
## Building
```shell
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:
```rust
extern crate mkhtmllib;
use mkhtmllib::{mkhtml, Config};
fn main() {
let mut c = Config::new();
c.set_pages_dir("path/".to_string());
mkhtml(c);
}
```