やってみる

アウトプットすべく己を導くためのブログ。その試行錯誤すらたれ流す。

静的サイトジェネレータZolaをビルドする

 v0.12.0。40分ほどかかった。

Zola

 Rust製の静的サイトジェネレータ。

ビルド

# curl -s https://api.github.com/repos/getzola/zola/releases/latest
TARGET_VERSION=0.12.0
[ ! -f "zola-${TARGET_VERSION}.zip" ] && wget https://github.com/getzola/zola/archive/v${TARGET_VERSION}.zip
[ ! -d "zola-${TARGET_VERSION}" ] && unzip zola-*.zip
cd zola-*/
cargo build --release
[ ! -L "{$HOME}/root/sys/env/tool/zola" ] && ln -s ./target/release/zola {$HOME}/root/sys/env/tool/zola

ヘルプ

zola --help
zola 0.12.2
Vincent Prouillet <hello@vincentprouillet.com>
A fast static site generator with everything built-in

USAGE:
    zola [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --config <config>    Path to a config file other than config.toml in the root of project
    -r, --root <root>        Directory to use as root of project [default: .]

SUBCOMMANDS:
    build    Deletes the output directory if there is one and builds the site
    check    Try building the project without rendering it. Checks links
    help     Prints this message or the help of the given subcommand(s)
    init     Create a new Zola project
    serve    Serve the site. Rebuild and reload on change automatically

所感

 Rustのビルドは遅い……。バイナリの実行速度は速いはずなので期待。

対象環境

$ uname -a
Linux raspberrypi 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux