| Crates.io | tola |
| lib.rs | tola |
| version | 0.5.12 |
| created_at | 2025-06-18 07:50:12.850584+00 |
| updated_at | 2025-08-16 11:03:37.137392+00 |
| description | static site generator for typst-based blog - keeping your focus on the content |
| homepage | https://github.com/kawayww/tola-ssg |
| repository | https://github.com/kawayww/tola-ssg |
| max_upload_size | |
| id | 1716731 |
| size | 621,228 |
(Still writing the document, releasing it shortly when I have some spare time)
tola: static site generator for Typst-based blog.
It handles the most tedious tasks unrelated to Typst itself.
e.g.,
Note: The release 0.5.0 is comming soon. (tailwindcss integration, github deployment)
The philosophy of tola:
Please just focus on Typst itself
tola helps you get closer!



cargo install tolaflake.nix already exists in the repo root, and you could use binary cache in tola.cachix.org:# flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
tola = {
url = "github:kawayww/tola";
inputs.nixpkgs.follows = "nixpkgs";
};
# ...
# ...
}
# ...
# ...
}
# configuration.nix
{ config, pkgs, inputs, ... }:
{
nix.settings = {
substituters = [
"https://tola.cachix.org"
# ...
# ...
];
trusted-public-keys = [
"tola.cachix.org-1:5hMwVpNfWcOlq0MyYuU9QOoNr6bRcRzXBMt/Ua2NbgA="
# ...
# ...
];
environment.systemPackages = with pkgs; [
# ...
# ...
] ++ [
inputs.tola.packages.${pkgs.system}.default
];
}
}
tola -h:A static site generator for typst-based blog
Usage: tola [OPTIONS] <COMMAND>
Commands:
init Init a template site
serve Serve the site. Rebuild and reload on change automatically
build Deletes the output directory if there is one and rebuilds the site
deploy Deletes the output directory if there is one and rebuilds the site
help Print this message or the help of the given subcommand(s)
Options:
-r, --root <ROOT> root directory path
-o, --output <OUTPUT> Output directory path related to `root`
-c, --content <CONTENT> Content directory path related to `root`
-a, --assets <ASSETS> Assets directory path related to `root`
-C, --config <CONFIG> Config file path related to `root` [default: tola.toml]
-m, --minify <MINIFY> Minify the html content [possible values: true, false]
-t, --tailwind <TAILWIND> enable tailwindcss support [possible values: true, false]
-h, --help Print help
-V, --version Print version
You should keep the directory structure identical to the below:
.
├── assets
│ ├── fonts
│ ├── iconfonts
│ ├── images
│ ├── scripts
│ ├── styles
├── content
│ ├── posts/
│ ├── categories/
│ ├── index.typ
│ ├── programming.typ
├── templates
│ └── normal.typ
└── utils
└── main.typ
Files under the content/ directory are mapped to their respective routes:
e.g., content/posts/examples/aaa.typ -> http://127.0.0.1:8282/posts/examples/aaa
(content/index.typ will be specially compiled into http://127.0.0.1:8282/index.html)
http://127.0.0.1:8000:
├── assets
│ ├── fonts
│ ├── iconfonts
│ ├── images
│ ├── scripts
│ └─ styles
├── posts/
├── categories/
└── index.html