Skip to content

Deploy your Thulite site

Ready to build and deploy your Thulite site? Follow one of our guides to different deployment services or scroll down for general guidance about deploying a Thulite site.

Deployment Guides

Quick Deploy Options

You can build and deploy a Thulite site to a number of hosts quickly using either their website’s dashboard UI or a CLI.

Website UI

A quick way to deploy your website is to connect your Thulite project’s online Git repository (e.g. GitHub, GitLab, Bitbucket) to a host provider and take advantage of continuous deployment using Git.

These host platforms automatically detect pushes to your Thulite project’s source repository, build your site and deploy it to the web at a custom URL or your personal domain. Often, setting up a deployment on these platforms will follow steps something like the following:

  1. Add your repository to an online Git provider (e.g. in GitHub, GitLab, Bitbucket)

  2. Choose a host that supports continuous deployment (e.g. Netlify or Vercel) and import your Git repository as a new site/project.

    Many common hosts will recognize your project as a Thulite site, and should choose the appropriate configuration settings to build and deploy your site as shown below. (If not, these settings can be changed.)

  3. Click “Deploy” and your new website will be created at a unique URL for that host (e.g. new-thulite-site.netlify.app).

The host will be automatically configured to watch your Git provider’s main branch for changes, and to rebuild and republish your site at each new commit. These settings can typically be configured in your host provider’s dashboard UI.

CLI Deployment

Some hosts will have their own command line interface (CLI) you can install globally to your machine using npm. Often, using a CLI to deploy looks something like the following:

  1. Install your host’s CLI globally, for example:

    Terminal window
    npm install --global netlify-cli
  2. Run the CLI and follow any instructions for authorization, setup etc.

  3. Build your site and deploy to your host

    Many common hosts will build and deploy your site for you. They will usually recognize your project as a Thulite site, and should choose the appropriate configuration settings to build and deploy as shown below. (If not, these settings can be changed.)

    Other hosts will require you to build your site locally and deploy using the command line.

Building Your Site Locally

Many hosts like Netlify and Vercel will build your site for you and then publish that build output to the web. But, some sites will require you to build locally and then run a deploy command or upload your build output.

You may also wish to build locally to preview your site, or to catch any potential errors and warnings in your own environment.

Run the command npm run build to build your Thulite site.

Terminal window
npm run build

By default, the build output will be placed at public/. This location can be changed using the publishDir configuration option.

Previewing Your Site Locally

Next to Hugo’s built-in development server, Thulite ships with http-server, a simple, zero-configuration command-line static HTTP server.

Run the command npm run preview to preview your Thulite site.

Terminal window
npm run preview

The http-server script is configured to run with gzip, brotli, and CORS enabled. These settings can be changed using the available options.