14 unstable releases (4 breaking)

0.5.0 Dec 18, 2023
0.4.3 Nov 10, 2023
0.3.3 Oct 15, 2023
0.2.3 Oct 14, 2023
0.1.0 Oct 31, 2022

#99 in Template engine

Download history 4/week @ 2024-02-22 4/week @ 2024-02-29 5/week @ 2024-03-28 152/week @ 2024-04-04 12/week @ 2024-04-11

169 downloads per month

MIT/Apache

78KB
1.5K SLoC

Rust 1K SLoC // 0.0% comments Python 288 SLoC // 0.4% comments Handlebars 20 SLoC

Tempura

Tempura is a pipeline-based Static Site Generator (SSG) written in Rust. You can define pipelines to generate your site from various resources such as Markdown, JSON, plain text, Handlebars templates, pictures, etc.

Installation

Build from source

cargo install tempura

Download binary

You can download a binary archive from releases page.

# Run one of the following to download binary archive
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-aarch64-apple-darwin.tar.gz
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-aarch64-unknown-linux-gnu.tar.gz
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-aarch64-unknown-linux-musl.tar.gz
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-i686-pc-windows-msvc.zip
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-i686-unknown-linux-gnu.tar.gz
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-i686-unknown-linux-musl.tar.gz
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-x86_64-apple-darwin.tar.gz
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-x86_64-pc-windows-msvc.zip
wget https://github.com/yuma140902/tempura/releases/latest/download/tempura-x86_64-unknown-linux-musl.tar.gz 

Or you can download and install with cargo-binstall.

cargo binstall tempura

Example

The content of this section is out of date. It contains information for v0.3.x, but the latest version is v0.5.x. Please wait for updates.

yuma14.net

tempura-example

Documentation

The content of this section is out of date. It contains information for v0.3.x, but the latest version is v0.5.x. Please wait for updates.

https://yuma14.net/tempura-doc/

General Usage

The content of this section is out of date. It contains information for v0.3.x, but the latest version is v0.5.x. Please wait for updates.

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.

Dependencies

~11–22MB
~303K SLoC