Need Theme Tweaks?

If you need to customize theme, add extra pages, or complete website development from scratch, you can hire us.

Check Our Services

Theme Installation

Prerequisites

You need to fulfill some prerequisites to configure your machine, before starting the development process of your static site via Hugo.

If you’re using macOS, then Homebrew is the easiest way to install the prerequisites. Check out this guide to install Homebrew on your machine.

  1. Install Hugo
  2. Install Go
  3. Install Nodejs

Install Hugo

Install Hugo with the following command on your Terminal according to your operating system.

winget install -e --id Hugo.Hugo.Extended

If you successfully installed Hugo, then you can check the version with the following command.

hugo version
brew install hugo

If you successfully installed Hugo, then you can check the version with the following command.

hugo version

Please follow the official documentation to install Hugo on Linux.

If you successfully installed Hugo, then you can check the version with the following command.

hugo version

Or

Go to the official site to Download and Install Hugo Extended.

Install Go

Install Go with the following command on your Terminal according to your operating system.

winget install -e --id GoLang.Go

If you successfully installed Go, then you can check the version with the following command.

go version
brew install go

If you successfully installed Go, then you can check the version with the following command.

go version

Please follow the official documentation to install Go on Linux.

If you successfully installed Go, then you can check the version with the following command.

go version

Or

Go to the official site to Download and Install Go.

Install Nodejs

Install Nodejs with the following command on your Terminal according to your operating system.

winget install -e --id OpenJS.NodeJS.LTS

If you successfully installed Nodejs, then you can check the version with the following command.

node -v
brew install node@18

If you successfully installed Nodejs, then you can check the version with the following command.

node -v

Please follow the official documentation to install Nodejs on Linux.

If you successfully installed Nodejs, then you can check the version with the following command.

node -v

Or

Go to the official site to Download and Install Nodejs.

After installing all the prerequisites, maybe you need to restart your machine to take effect.


Setup Your Project

Unzip the downloaded file, and you will find the logbook-hugo folder inside the themes directory. This folder contains your main theme, which you will be working with.

πŸ“‚ logbook-hugo/ (Unzipped Folder)
   |
   β”œβ”€β”€ πŸ“ themes/
   |     |
   |     └── πŸ“‚ logbook-hugo/ (Main Theme)
   |
   β”œβ”€β”€ πŸ“„ changelog.html
   β”œβ”€β”€ πŸ“„ documentation.html
   └── πŸ“„ license.html

You can set up your project in two ways. (Follow any one of them)

  1. Gethugothemes Exclusive Way (Recommended)
  2. Traditional Way
  1. Open the logbook-hugo (Main Theme) using your favorite code editor. VS Code is recommended.

  2. Open the VS Code terminal (Ctrl+`) and execute the following command to set up your project:

    npm run project-setup
    

Traditional Way

If you want to set up your project in the traditional way, then follow the link: Traditional Project Setup


Run Your Project Locally

  1. Open vscode terminal (ctrl+`) and run the following command to install all dependencies.

    npm install
    
  2. Run the following command to start the development server.

    npm run dev
    
  3. Now, you get a generated URL and open it in your browser. The default URL looks like this localhost:1313.

If your website doesn’t serve on your localhost, then check the theme name is correct in your CONFIG file. Then run npm run dev command again.


Build Your Project

After completing your development process, you can build your project for production. You can build your project with the following command.

npm run build
Improve this page on Github  — Last updated:  Tue, Jul 25, 2023