Blog Setup (part 1) : Hugo Setup
[!WARNING]
For my blog, I am no longer using the anatole theme showed in this post and series. I made a Tailwind CSS theme. Read about it in Hugo Theme Development Series
Install Hugo
Follow installation directions at https://gohugo.io/getting-started/installing/#windows
Create directories C:\Hugo and C:\Hugo\bin
Download Hugo and extract to C:\Hugo\bin
Add C:\Hugo\bin\hugo.exe to PATH
Setup Git
Create private repo on GitHub
Add .gitignore file (https://github.com/github/gitignore/blob/main/community/Golang/Hugo.gitignore)
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux
# Temporary lock file while building
/.hugo_build.lock
Create folder project folder on desktop
Clone GitHub repo to the folder
git clone https://github.com/<username>/<repo>
Modify site info
Change baseURL
and title
in config.toml
baseURL = 'https://blog.missingdirective.com/'
languageCode = 'en-us'
title = 'Missing Directive'
Use theme
I am using Anatole Hugo Theme (https://github.com/lxndrblz/anatole)
Since I want to make changes to the theme, I forked it on GitHub before adding it to the project.
git submodule add https://github.com/<username>/anatole.git themes/anatole
Enable theme in config.toml
theme='anatole'
Add taxonomies
Add in config.toml
[taxonomies]
category = 'categories'
series = 'series'
tag = 'tags'
Add menus
Add in config.toml
[menu]
[[menu.main]]
name = "Home"
identifier = "home"
weight = 100
url = "/"
[[menu.main]]
name = "Posts"
weight = 200
identifier = "posts"
url = "/posts/"
[[menu.main]]
name = "Tags"
weight = 300
identifier = "tags"
url = "/tags/"
[[menu.main]]
name = "Series"
weight = 400
identifier = "Series"
url = "/series/"
[[menu.main]]
name = "About"
weight = 500
identifier = "about"
url = "/about/"