Deployment (部署)
使用 Netlify
詳細步驟
[build]
# This assumes that the Zola site is in a docs folder. If it isn't, you don't need
# to have a `base` variable but you do need the `publish` and `command` variables.
publish = "public"
command = "zola build"
[build.environment]
# Set the version name that you want to use and Netlify will automatically use it.
# 使用 zola -V 來獲得最新版號
ZOLA_VERSION = "0.18.0"
# The magic for deploying previews of branches.
# We need to override the base url with whatever url Netlify assigns to our
# preview site. We do this using the Netlify environment variable
# `$DEPLOY_PRIME_URL`.
[context.deploy-preview]
command = "zola build --base-url $DEPLOY_PRIME_URL"
- 將包含
netlify.toml 的網站 git 發送到 GitHub、GitLab 等託管網站
- 進入 Netlify 選擇託管網站來源
- 確認是否正常運行