Hugois a fast, open-source static site generator that simplifies creating websites.
brew install hugo
Creating a new hugo site
hugo new site <my-site-name>
- replace <my-site-name> with my desired project name: sarah-hugo
Installing a Theme for my hugo site
- Hugo doesn’t come with a built-in default theme - choose a theme fromhugo themesthat suits my project (popular: Ananke theme (for beginners)) + Initializing a Git Repository (in <my-site-name> folder)
cd sarah-hugo
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
Configure Hugo to use the theme by editing the hugo.toml configuration file
# vi sarah-hugo/hugo.toml baseURL = 'https://example.org/' languageCode = 'en-us' title = 'My New Hugo Site'
theme = "ananke"
Creating a Simple Content File
hugo new posts/my-first-post.md
generates a new Markdown file located in the content/posts directory
open the newly created file in my preferred text editor:
nano content/posts/my-first-post.md
+++ date = '2025-11-05T17:45:09+09:00' draft = true title = 'My First Post' +++
add some content below the front matter
# Welcome to My First Post!
This is my very first post using Hugo and Git. Exciting times ahead!
in nano, CTR + 0, then Enter, and then CTRL + X to exit
Staging my changes
stage all changes in my project directory by running:
git add .
Making my first commit
git config --global user.email "my@gmail.com"
git config --global user.name "my name"
git commit -m "Add first post: My First Post"