Startup Hugo theme for business

Hugo hosting on Netlify

Configure Hugo for deployment

Create a new file in your project’s root netlify.toml. If you’re using out Startup Hugo theme, the file is already there, so you can skip this step.

Paste the following code in the netlify.toml file and save:`

publish = "public"
command = "hugo --gc --minify"

HUGO_VERSION = "0.111.3"
HUGO_ENV = "production"

command = "hugo --gc --minify --enableGitInfo"

HUGO_VERSION = "0.111.3"
HUGO_ENV = "production"

command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

HUGO_VERSION = "0.111.3"

command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

HUGO_VERSION = "0.111.3"


from = "/en/*"
to = "/en/404.html"
status = 404

from = "/de/*"
to = "/de/404.html"
status = 404

Create Netlify Account

The next thing you need to do is create a Netlify account if you do not have one already go to Netlify and sign up.

Import project

Now that our Netlify account is created, we are ready to add our site to Netlify. Login into your Netlify account.

  1. Click on the “Add New Site” button and select “Import an existing project”

  2. Next click on your Git provider e.g. “Deploy with Github”. Hugo hosting on Netlify, select Git provider

  3. Pick your website’s repository from the list and click “Deploy” Button.

Changing the URL for the site

Netlify will automatically assign a URL to our site. We have the option to change this URL to something more memorable or connect our own domain to the site. Let’s start by looking at how to rename the Netlify domain.

After you finish importing the repository, Netlify will direct you to the site details, where you can find the URL that Netlify has assigned (usually the domain) to the site. Additionally, you can view the Production deploys that have been done for the site, which, at this point, will only include the initial deployment.

If you want to modify the URL that Netlify has assigned, follow these steps:

  1. Click on the domain settings.
  2. Click on the options next to the domain name.
  3. Select “Edit Name.”

The last task is to fix the asset references on our site. Currently, our config.toml file specifies that the baseurl is We need to update this to match our Netlify URL.

Follow these steps to make the change:

  1. Open the config.toml file located in the root of our theme.
  2. Locate the baseurl parameter and update it to reflect your Netlify URL.
  3. Commit and push the changes to your Git repository.

Once you’ve pushed the changes to your repository, Netlify will automatically build and deploy your site.