content: Update Netlify hosting guide and version refs
@@ -77,7 +77,7 @@ extended
|
|||||||
: (`bool`) Whether the extended edition of Hugo is required, satisfied by installing either the extended or extended/deploy edition.
|
: (`bool`) Whether the extended edition of Hugo is required, satisfied by installing either the extended or extended/deploy edition.
|
||||||
|
|
||||||
max
|
max
|
||||||
: (`string`) The maximum Hugo version supported, for example `0.149.0`.
|
: (`string`) The maximum Hugo version supported, for example `0.150.0`.
|
||||||
|
|
||||||
min
|
min
|
||||||
: (`string`) The minimum Hugo version supported, for example `0.102.0`.
|
: (`string`) The minimum Hugo version supported, for example `0.102.0`.
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
|
|||||||
To build and install a specific release:
|
To build and install a specific release:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.149.0
|
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.150.0
|
||||||
```
|
```
|
||||||
|
|
||||||
To build and install at the latest commit on the master branch:
|
To build and install at the latest commit on the master branch:
|
||||||
|
|||||||
@@ -11,5 +11,5 @@ params:
|
|||||||
---
|
---
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
{{ hugo.Generator }} → <meta name="generator" content="Hugo 0.149.0">
|
{{ hugo.Generator }} → <meta name="generator" content="Hugo 0.150.0">
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -11,5 +11,5 @@ params:
|
|||||||
---
|
---
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
{{ hugo.Version }} → 0.149.0
|
{{ hugo.Version }} → 0.150.0
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Let's say you need to publish a file named "site.json" in the root of your `publ
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"build_date": "2025-07-08T13:12:19-07:00",
|
"build_date": "2025-07-08T13:12:19-07:00",
|
||||||
"hugo_version": "0.149.0",
|
"hugo_version": "0.150.0",
|
||||||
"last_modified": "2025-07-07T22:09:13-07:00"
|
"last_modified": "2025-07-07T22:09:13-07:00"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ hugo version
|
|||||||
You should see something like:
|
You should see something like:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
hugo v0.149.0-66240338f1b908ca3b163384c8229943e74eb290+extended linux/amd64 BuildDate=2025-08-27T15:37:16Z VendorInfo=gohugoio
|
hugo v0.150.0-3f5473b7d4e7377e807290c3acc89feeef1aaa71+extended linux/amd64 BuildDate=2025-09-08T13:01:12Z VendorInfo=gohugoio
|
||||||
```
|
```
|
||||||
|
|
||||||
## Display available commands
|
## Display available commands
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ Step 2
|
|||||||
env:
|
env:
|
||||||
variables:
|
variables:
|
||||||
# Application versions
|
# Application versions
|
||||||
DART_SASS_VERSION: 1.91.0
|
DART_SASS_VERSION: 1.92.1
|
||||||
GO_VERSION: 1.25.0
|
GO_VERSION: 1.25.1
|
||||||
HUGO_VERSION: 0.149.0
|
HUGO_VERSION: 0.150.0
|
||||||
# Time zone
|
# Time zone
|
||||||
TZ: Europe/Oslo
|
TZ: Europe/Oslo
|
||||||
# Cache
|
# Cache
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ Step 1
|
|||||||
: Create a `wrangler.toml` file in the root of your project.
|
: Create a `wrangler.toml` file in the root of your project.
|
||||||
|
|
||||||
```toml {file="wrangler.toml" copy=true}
|
```toml {file="wrangler.toml" copy=true}
|
||||||
# Configure Cloudflare Worker
|
|
||||||
|
|
||||||
name = "hosting-cloudflare-worker"
|
name = "hosting-cloudflare-worker"
|
||||||
compatibility_date = "2025-07-31"
|
compatibility_date = "2025-07-31"
|
||||||
|
|
||||||
@@ -53,9 +51,9 @@ Step 2
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
||||||
DART_SASS_VERSION=1.91.0
|
DART_SASS_VERSION=1.92.1
|
||||||
GO_VERSION=1.25.0
|
GO_VERSION=1.25.1
|
||||||
HUGO_VERSION=0.149.0
|
HUGO_VERSION=0.150.0
|
||||||
NODE_VERSION=22.18.0
|
NODE_VERSION=22.18.0
|
||||||
|
|
||||||
export TZ=Europe/Oslo
|
export TZ=Europe/Oslo
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ jobs:
|
|||||||
runs-on: codeberg-tiny-lazy
|
runs-on: codeberg-tiny-lazy
|
||||||
container:
|
container:
|
||||||
# Specify "hugomods/hugo:exts" if you want to always use the latest version of Hugo for building.
|
# Specify "hugomods/hugo:exts" if you want to always use the latest version of Hugo for building.
|
||||||
image: "hugomods/hugo:exts-0.149.0"
|
image: "hugomods/hugo:exts-0.150.0"
|
||||||
steps:
|
steps:
|
||||||
- name: Clone the repository
|
- name: Clone the repository
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
@@ -201,7 +201,7 @@ jobs:
|
|||||||
runs-on: codeberg-tiny-lazy
|
runs-on: codeberg-tiny-lazy
|
||||||
container:
|
container:
|
||||||
# Specify "hugomods/hugo:exts" if you want to always use the latest version of Hugo for building.
|
# Specify "hugomods/hugo:exts" if you want to always use the latest version of Hugo for building.
|
||||||
image: "hugomods/hugo:exts-0.149.0"
|
image: "hugomods/hugo:exts-0.150.0"
|
||||||
steps:
|
steps:
|
||||||
- name: Clone the repository
|
- name: Clone the repository
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
|
|||||||
@@ -77,9 +77,9 @@ Step 4
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
DART_SASS_VERSION: 1.91.0
|
DART_SASS_VERSION: 1.92.1
|
||||||
GO_VERSION: 1.25.0
|
GO_VERSION: 1.25.1
|
||||||
HUGO_VERSION: 0.149.0
|
HUGO_VERSION: 0.150.0
|
||||||
NODE_VERSION: 22.18.0
|
NODE_VERSION: 22.18.0
|
||||||
TZ: Europe/Oslo
|
TZ: Europe/Oslo
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ Define your [CI/CD](g) jobs by creating a `.gitlab-ci.yml` file in the root of y
|
|||||||
```yaml {file=".gitlab-ci.yml" copy=true}
|
```yaml {file=".gitlab-ci.yml" copy=true}
|
||||||
variables:
|
variables:
|
||||||
# Application versions
|
# Application versions
|
||||||
DART_SASS_VERSION: 1.91.0
|
DART_SASS_VERSION: 1.92.1
|
||||||
HUGO_VERSION: 0.149.0
|
HUGO_VERSION: 0.150.0
|
||||||
NODE_VERSION: 22.18.0
|
NODE_VERSION: 22.18.0
|
||||||
# Git
|
# Git
|
||||||
GIT_DEPTH: 0
|
GIT_DEPTH: 0
|
||||||
@@ -35,7 +35,7 @@ variables:
|
|||||||
TZ: Europe/Oslo
|
TZ: Europe/Oslo
|
||||||
|
|
||||||
image:
|
image:
|
||||||
name: golang:1.25.0-bookworm
|
name: golang:1.25.1-bookworm
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|||||||
@@ -23,108 +23,99 @@ Please complete the following tasks before continuing:
|
|||||||
|
|
||||||
## Procedure
|
## Procedure
|
||||||
|
|
||||||
|
<!-- Using "text" as the code block language because "toml" looks terrible. -->
|
||||||
|
|
||||||
Step 1
|
Step 1
|
||||||
: Log in to your Netlify account, navigate to the Sites page, press the **Add new site** button, and choose "Import an existing project" from the dropdown menu.
|
: Create a `netlify.toml` file in the root of your project.
|
||||||
|
|
||||||
|
```text {file="netlify.toml" copy=true}
|
||||||
|
[build.environment]
|
||||||
|
DART_SASS_VERSION = "1.92.1"
|
||||||
|
GO_VERSION = "1.25.1"
|
||||||
|
HUGO_VERSION = "0.150.0"
|
||||||
|
NODE_VERSION = "22.18.0"
|
||||||
|
TZ = "Europe/Oslo"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
publish = "public"
|
||||||
|
command = """\
|
||||||
|
git config core.quotepath false && \
|
||||||
|
hugo --gc --minify --baseURL "${URL}"
|
||||||
|
"""
|
||||||
|
```
|
||||||
|
|
||||||
|
If your site requires Dart Sass to transpile Sass to CSS, set the `DART_SASS_VERSION` and include the Dart Sass installation in the build step.
|
||||||
|
|
||||||
|
```text {file="netlify.toml" copy=true}
|
||||||
|
[build.environment]
|
||||||
|
DART_SASS_VERSION = "1.92.1"
|
||||||
|
GO_VERSION = "1.25.1"
|
||||||
|
HUGO_VERSION = "0.150.0"
|
||||||
|
NODE_VERSION = "22.18.0"
|
||||||
|
TZ = "Europe/Oslo"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
publish = "public"
|
||||||
|
command = """\
|
||||||
|
curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && \
|
||||||
|
tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && \
|
||||||
|
rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && \
|
||||||
|
export PATH="${HOME}/.local/dart-sass:${PATH}" && \
|
||||||
|
git config core.quotepath false && \
|
||||||
|
hugo --gc --minify --baseURL "${URL}"
|
||||||
|
"""
|
||||||
|
```
|
||||||
|
|
||||||
Step 2
|
Step 2
|
||||||
: Select your deployment method.
|
: Commit the changes to your local Git repository and push to your GitHub repository.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Step 3
|
Step 3
|
||||||
: Authorize Netlify to connect with your GitHub account by pressing the **Authorize Netlify** button.
|
: In the upper right corner of the Netlify dashboard, press the **Add new project** button and select “Import an existing project".
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Step 4
|
Step 4
|
||||||
: Press the **Configure Netlify on GitHub** button.
|
: Connect to GitHub.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Step 5
|
Step 5
|
||||||
: Install the Netlify app by selecting your GitHub account.
|
: Press the "Authorize Netlify" button to allow the Netlify application to access your GitHub account.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Step 6
|
Step 6
|
||||||
: Press the **Install** button.
|
: Press the **Configure Netlify on GitHub** button.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Step 7
|
Step 7
|
||||||
: Click on the site's repository from the list.
|
: Select the GitHub account where you want to install the Netlify application.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Step 8
|
Step 8
|
||||||
: Set the site name and branch from which to deploy.
|
: Authorize the Netlify application to access all repositories or only select repositories, then press the Install button.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Your browser will be redirected to the Netlify dashboard.
|
||||||
|
|
||||||
Step 9
|
Step 9
|
||||||
: Define the build settings, press the **Add environment variables** button, then press the **New variable** button.
|
: Click on the name of the repository you wish to import.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Step 10
|
Step 10
|
||||||
: Create a new environment variable named `HUGO_VERSION` and set the value to the [latest version](https://github.com/gohugoio/hugo/releases/latest).
|
: On the "Review configuration" page, enter a project name, leave the settings at their default values, then press the **Deploy** button.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
Step 11
|
Step 11
|
||||||
: Press the "Deploy my new site" button at the bottom of the page.
|
: When the deployment completes, click on the link to your published site.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Step 12
|
In the future, whenever you push a change from your local Git repository, Netlify will rebuild and deploy your site.
|
||||||
: At the bottom of the screen, wait for the deploy to complete, then click on the deploy log entry.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Step 13
|
|
||||||
: Press the **Open production deploy** button to view the live site.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Configuration file
|
|
||||||
|
|
||||||
In the procedure above we configured our site using the Netlify user interface. Most site owners find it easier to use a configuration file checked into source control.
|
|
||||||
|
|
||||||
Create a new file named `netlify.toml` in the root of your project directory. In its simplest form, the configuration file might look like this:
|
|
||||||
|
|
||||||
```toml {file="netlify.toml"}
|
|
||||||
[build.environment]
|
|
||||||
GO_VERSION = "1.25.0"
|
|
||||||
HUGO_VERSION = "0.149.0"
|
|
||||||
NODE_VERSION = "22.18.0"
|
|
||||||
TZ = "Europe/Oslo"
|
|
||||||
|
|
||||||
[build]
|
|
||||||
publish = "public"
|
|
||||||
command = """\
|
|
||||||
git config core.quotepath false && \
|
|
||||||
hugo --gc --minify --baseURL "${URL}"
|
|
||||||
"""
|
|
||||||
```
|
|
||||||
|
|
||||||
If your site requires Dart Sass to transpile Sass to CSS, the configuration file should look something like this:
|
|
||||||
|
|
||||||
```toml {file="netlify.toml"}
|
|
||||||
[build.environment]
|
|
||||||
DART_SASS_VERSION = "1.91.0"
|
|
||||||
GO_VERSION = "1.25.0"
|
|
||||||
HUGO_VERSION = "0.149.0"
|
|
||||||
NODE_VERSION = "22.18.0"
|
|
||||||
TZ = "Europe/Oslo"
|
|
||||||
|
|
||||||
[build]
|
|
||||||
publish = "public"
|
|
||||||
command = """\
|
|
||||||
curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && \
|
|
||||||
tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && \
|
|
||||||
rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" && \
|
|
||||||
export PATH="${HOME}/.local/dart-sass:${PATH}" && \
|
|
||||||
git config core.quotepath false && \
|
|
||||||
hugo --gc --minify --baseURL "${URL}"
|
|
||||||
"""
|
|
||||||
```
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 10 KiB |
@@ -35,11 +35,11 @@ Step 1
|
|||||||
staticPublishPath: public
|
staticPublishPath: public
|
||||||
envVars:
|
envVars:
|
||||||
- key: DART_SASS_VERSION
|
- key: DART_SASS_VERSION
|
||||||
value: 1.91.0
|
value: 1.92.1
|
||||||
- key: GO_VERSION
|
- key: GO_VERSION
|
||||||
value: 1.25.0
|
value: 1.25.1
|
||||||
- key: HUGO_VERSION
|
- key: HUGO_VERSION
|
||||||
value: 0.149.0
|
value: 0.150.0
|
||||||
- key: NODE_VERSION
|
- key: NODE_VERSION
|
||||||
value: 22.18.0
|
value: 22.18.0
|
||||||
- key: TZ
|
- key: TZ
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ Step 2
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
||||||
DART_SASS_VERSION=1.91.0
|
DART_SASS_VERSION=1.92.1
|
||||||
GO_VERSION=1.25.0
|
GO_VERSION=1.25.1
|
||||||
HUGO_VERSION=0.149.0
|
HUGO_VERSION=0.150.0
|
||||||
NODE_VERSION=22.18.0
|
NODE_VERSION=22.18.0
|
||||||
|
|
||||||
export TZ=Europe/Oslo
|
export TZ=Europe/Oslo
|
||||||
|
|||||||