はにおかさいのブログ

コーディング

初投稿

初投稿

初投稿のページです。

Zolaでサイト作成。

バイナリをhttps://github.com/getzola/zola/releasesから落とす。

シングルバイナリなので便利。

初期化

PS Z:\users\desktop\zola_test> Z:\users\desktop\zola_test\zola.exe
zola 0.9.0
Vincent Prouillet <[email protected]vincentprouillet.com>
A fast static site generator with everything built-in

USAGE:
    zola.exe [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 [default: config.toml]

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
PS Z:\users\desktop\zola_test>

PS Z:\users\desktop\zola_test> .\zola init my_site
Welcome to Zola!
Please answer a few questions to get started quickly.
Any choices made can be changed by modifying the `config.toml` file later.
> What is the URL of your site? (https://example.com): http://localhost
> Do you want to enable Sass compilation? [Y/n]: y
> Do you want to enable syntax highlighting? [y/N]: y
> Do you want to build a search index of the content? [y/N]: y

Done! Your site was created in "\\\\?\\Z:\\users\\desktop\\zola_test\\my_site"

Get started by moving into the directory and using the built-in server: `zola serve`
Visit https://www.getzola.org for the full documentation.

テーマを入れる

公式テンプレートリスト https://www.getzola.org/documentation/getting-started/cli-usage/

これにした。https://www.getzola.org/themes/dinkleberg/

PS Z:\users\desktop\zola_test\my_site> cd themes
PS Z:\users\desktop\zola_test\my_site\themes> git clone https://github.com/rust-br/dinkleberg
Cloning into 'dinkleberg'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
rRemote: Total 189 (delta 0), reused 1 (delta 0), pack-reused 184                                                 Receiving objects:  85% (161/189), 412.01 KiB | 725.00 KiB/s
Receiving objects: 100% (189/189), 700.63 KiB | 725.00 KiB/s, done.
Resolving deltas: 100% (87/87), done.
Checking connectivity... done.
PS Z:\users\desktop\zola_test\my_site\themes>

my_site\config.tomlを編集

UTF-8でね。 [extra]でないところに themes = "dinkleberg" と書く。

PS Z:\users\desktop\zola_test\my_site\themes> cd ../
PS Z:\users\desktop\zola_test\my_site>  .\..\zola serve
Building site...
-> Creating 0 pages (0 orphan), 0 sections, and processing 0 images
Done in 36ms.

Listening for changes in Z:\users\desktop\zola_test\my_site\{content, config.toml, static, templates, themes, sass}
Press Ctrl+C to stop

Web server is available at http://127.0.0.1:1111

20200329-1

参考

https://www.getzola.org/documentation/getting-started/cli-usage/