Build and deploy a static business website in 15 minutes

Stefan Pöltl
3 min readOct 14, 2019

You need to build a simple static website? The best tool I’ve seen so far is Hugo, a static website builder written in Go.

Start building the page

  1. Install Hugo, create a project directory and run the following in your terminal:
hugo new site my-page

2. Change to the directory and initialize a git repo:

cd my-page && git init

3. Install a theme (hugo-fresh business theme)

git submodule add https://github.com/StefMa/hugo-fresh.git themes/hugo-fresh && curl -O https://raw.githubusercontent.com/StefMa/hugo-fresh/master/exampleSite/config.yaml && rm config.toml

4. Run your website locally and browse it at http://localhost:1313

hugo server

Now you can see your website looking like this:

Your page at http://localhost:1313

To adjust the content you can manage everything in your config.yaml file in the root of your project. When you start to make changes to this file and save it, your changes are going to be refreshed immediately in the browser. Please note that you still need to have hugo server running in the background.

Create a sub page

To create a sub page you need to create a directory in your project root called content and create a file there e.g. products.md. You can add your markdown there and reach the file by browsing http://localhost:1313/products/. Be sure you restart the hugo server command to get your sub page tracked by the auto-refresh tool when you do some changes in this file. As example you can put the following markup there:

---
title: Products
include_footer: true
---
{{% title3 "Our lovely Products" %}}Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed velit est, elementum ac leo ut, varius aliquet nisi. Aliquam vehicula nulla leo, id laoreet nisi facilisis at. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

First you set the title of the page and you can decide to keep the footer at the bottom of the page or not. After this there is a headline with some sample text:

--

--