Tempura
Tempura is a Static Site Generator (SSG) written in Rust. It can generate HTML from Markdown documents and Handlebars templates. It can also handle static content including images and CSS files, and resolve paths accurately.
Installation
Build from source
Download binary
You can download a binary archive from releases page.
# run one of the following to download binary archive
Or you can download and install with cargo-binstall.
Example
WebTools
- Repo: https://github.com/yuma140902/webtools
- Generated website: https://www.yuma14.net/webtools/
tempura-example
- Repo: https://github.com/yuma140902/tempura-example
- Generated website: https://yuma140902.github.io/tempura-example/sample.html
Documentation
https://yuma140902.github.io/tempura-doc/
General Usage
1. Setup project
Run tempura init my_project.
The following directories and files will be created.
my_project
│ tempura.json
│
├─public
└─src
├─pages
│ │ sample.md
│ │ style.css
│ │
│ └─sub_dir
│ sample2.md
│
└─templates
page.html.hbs
2. Edit
Edit template files and markdown files as you like.
See also Handlebars Language Guide and CommonMark Specification. It is possible to write front matter, which is out of CommonMark specification.
3. Build
Run cd my_project && tempura build.
HTML files are generated in the my_project/public/ directory.
4. Deploy
Copy contents of my_project/public/ to your server.