This article show you how to deploy your site to Cloudflare Pages.
Creating a Project#
We’ll start by creating a Git project and filling in the appropriate information.
Build Command#
1npm i && hugo --gc --minify --enableGitInfo -b https://hbs-skeleton.pages.dev
npm i
is a shortcut tonpm install
, which installs the dependencies used during the site build.-b https://hbs-skeleton.pages.dev
specifiesbaseURL
, please replace it yourself. You can also save it to a configuration file instead of specifying it in the build command.
Environment Variables#
Name | Value |
---|---|
HUGO_VERSION | 0.101.0 |
NODE_VERSION | 16 |
404 Page#
Cloudflare is smart enough to use the best matching 404 pages, even for multilingual sites, and works without additional configurations.
Comments