Create your first Hugo website locally on Windows

This article explains how to create your first web site on Windows using Hugo.

Prequisites

Install Hugo

From a terminal type:

1choco install hugo-extended

Create a new hugo web site

1hugo new site "mysite"

Go to the previously created web site

1cd mysite
1git init

Install a theme (eg. Hugo Clarity Theme)

1git submodule add https://github.com/chipzoller/hugo-clarity themes/hugo-clarity

For hugo clarity copy current config and pages

1Copy-Item -Path "themes/hugo-clarity/exampleSite/*" -Destination "." -Recurse -Force
2Remove-Item -Path "hugo.toml" -Force

Display you website locally

1hugo server

You have a demo a local demo of your web site from: http://localhost:1313/

Create your first post

1hugo new content content/post/my-first-post.md

Add markdown content

 1+++
 2title = 'My First Post'
 3date = 2024-01-14T07:07:07+01:00
 4draft = true
 5+++
 6
 7## Introduction
 8
 9This is **bold** text, and this is *emphasized* text.
10
11Visit the [Hugo](https://gohugo.io) website!

Enjoy!