⚠ This project is not actively maintained. See: https://github.com/Andrewnt219/paper-csharp
Static site generator (SSG) made with Rust.
Sample website: https://paper-sample.vercel.app/
To start running:
-
Run
$ cargo run -- --help
USAGE:
paper.exe [OPTIONS]
FLAGS:
-h, --help Print help information
-V, --version Print version information
OPTIONS:
-i, --input <FILE>... Path to file(s)
-o, --output <FILE> Path to output file
-s, --stylesheet <URL or FILE> Link to stylesheet
The index file includes paths to all the generated html files (recursively)
$ cargo run -- -i dir-with-nested-dirs-and-files
Content of .css
files are bundled into all the generated .html
files
$ cargo run -- -i page.txt --stylesheet ./my-style.css
If a directory is passed as --input
, dist
keeps the structure of the source dir
$ cargo run -- -i sample-dir
├── sample-dir
├── Cargo.toml
├── sample-dir
│ ├── sub-dir-1
│ └── sub-dir-2
│ └── page-1.txt
├── dist
│ ├─ sample-dir
│ ├── sub-dir-1
│ └── sub-dir-2
│ └── page-1.html
Title is the first line of the file, followed by 2 empty lines
Specify a different output directory, default is dist
Markdown syntax supports HTML headers from <h1>
to <h6>
as #
all the way to ######
, respectively.
$ cargo run -- -i sample.txt --output pages