Netlify
Netlify provides hosting and serverless backend services for web apps and static sites. You can host any Thulite site on Netlify.
This guide shows how to deploy with the Netlify web UI or Netlify CLI.
How to deploy
Deploy to Netlify using the web UI or Netlify CLI.
Website UI Deployment
If your project is in GitHub, GitLab, Bitbucket, or Azure DevOps, you can deploy from the Netlify web UI.
- Click Add a new site in your Netlify dashboard
Choose Import an existing project
When you import your Thulite repository from your Git provider, Netlify should automatically detect and pre-fill the correct configuration settings for you.
Confirm these settings, then click Deploy:
- Build Command:
npm run build - Publish directory:
public
- Build Command:
After deployment, you are redirected to the site overview page, where you can edit site details.
Future changes to your repository trigger preview and production deploys based on your configuration.
netlify.toml file
You can optionally add a netlify.toml file at the root of your repository to configure the build command, publish directory, and other settings such as environment variables and redirects. Netlify reads this file and applies the configuration automatically.
To configure default settings, create a netlify.toml file with the following content:
[build]
publish = "public"
command = """\
git config core.quotepath false && \
npm install && \
hugo build --gc --minify --baseURL "${URL}"
"""Learn more about deploying with Git in the Netlify docs.
CLI Deployment
You can also create a new Netlify site and link your Git repository with the Netlify CLI.
Install Netlify’s CLI globally
- Run
netlify login, then follow the prompts to authenticate. - Run
netlify initand follow the prompts. Confirm your build command (
npm run build)The CLI detects the build command (
npm run build) and publish directory (public), and offers to generate anetlify.tomlfile with those settings.Build and deploy by pushing to Git
The CLI adds a deploy key to your repository, so Netlify rebuilds your site automatically on each
git push.
Learn more about the Netlify CLI in the Netlify docs.
Set a Node.js Version
If you use the legacy
build image (Focal) on Netlify, make sure your Node.js version is set. Thulite requires v24.0.4 or later.
You can specify your Node.js version in Netlify using:
- a
.nvmrcfile in your base directory. - a
NODE_VERSIONenvironment variable in your site’s settings using the Netlify project dashboard. - a
NODE_VERSIONenvironment variable in your site’snetlify.toml, for example:
[build.environment]
DART_SASS_VERSION = "1.97.3"
GO_VERSION = "1.26.0"
HUGO_VERSION = "0.156.0"
NODE_VERSION = "24.13.1"
NPM_VERSION = "11.8.0"
TZ = "Europe/Amsterdam"Using Netlify Functions
No special configuration is required to use Netlify Functions with Thulite. Add a netlify/functions directory to your project root, then follow
the Netlify Functions documentation to get started.
Learn more
Host on Netlify
Official Hugo guide for deploying sites on Netlify.