Open13

Zola on cloudflare

com4dccom4dc

Create project

 zola init zola-com4dc-project
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):
> 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 /Users/hoge/zola-com4dc-project

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

Create Github Repository

  • 適当なRepositoryを作る
  • zola-com4dc-project を関連づけてPush
  • static, sass, tempaltes 等は空ディレクトリなので .gitkeep 等を配置して Commit 対象にしておく
com4dccom4dc

Pages

  • Workers & Pages を選択
  • Pages タブから Create application
  • Github Repositoryに関連付け
com4dccom4dc

Deploy Settings

  • Framework から Zola を選択
  • ビルド対象ブランチを main
  • ビルドコマンドを zola biuld
  • 生成物のディレクトリを public
com4dccom4dc

Fix Error

プロジェクトの Settings タブへ移動し、 Builds and Deployments を選択する。

Build system version の箇所でバージョンを変更できる。元々は 2 が選択されている。ここを 1 に変える

com4dccom4dc

Rebuild

再度Rebuildするとビルドに成功し、ページが Publish される

com4dccom4dc

感触

Zola そのものは手軽で良さそうなのだが、Cloudflare の最新の Build System に組み込まれていないというのが気になった。Version 1で動くには動くのだが、そのうちなくなりそうだしどうしたものか。