chapter two

2 Live in 30 minutes – you now have a website

 

This chapter covers:

  • Understanding the Hugo command line
  • Setting up a new website in Hugo with themes and content.
  • Outlining the structure of a Hugo based website
  • Setting up a automatic deployment pipeline with Hugo
  • Measuring performance and analyzing maintainability of a website.

Hugo is extremely easy to get started. It does not have any major dependencies and does not require a beefy hardware to run. It is fast and can be used on old hardware and the basic versions of cloud based virtual machines.

In this chapter we will be creating a basic website for a company named Acme Corporation. Acme Corporation is a leading manufacturer of shapes like lines, circles, squares and triangle in digital form in the planet. We will be using an existing Hugo theme and start with understanding how to add content to a Hugo website.

The website that we will start in this chapter, will be enhanced throughout the book. In this chapter we will be creating the basic structure of the website, select a theme for it, add some pages and customize the home page with our own HTML/CSS.

The information to get up and running with Hugo is available in the appendix. You can also use the official website https://gohugo.io/ to get Hugo as well as refer to its documentation. You do not need to install Go to get Hugo. It is available in all major platforms. *This book needs Hugo with a version greater than on equal to v0.75.1.

2.1 Your first Hugo website

2.1.1 The Hugo command line

2.1.2 Adding to source control

2.1.3 Structure of a Hugo website

2.2 Adding a theme

2.2.1 Adding a theme to the website

2.2.2 Running the dev server

2.3 Adding content

2.3.1 Configuration

2.3.2 Content Pages

2.3.3 Index Page

2.4 Continuous Delivery

2.4.1 Netlify hosting

2.4.2 GitHub Pages

2.4.3 AWS, Azure and Google Cloud

2.5 Meeting the goals for performance and maintainability

2.5.1 Performance

2.5.2 Maintainability

2.6 Choose the theme wisely

2.7 Summary