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 iis a shortcut tonpm install, which installs the dependencies used during the site build.-b https://hbs-skeleton.pages.devspecifiesbaseURL, 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.147.9 |
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