In the previous articles I wrote them under the assumption that the user was for MacOS or Linux, but what about Windows? If you are a Windows user then this article is for you!
Go to the following link and download the latest version of Golang programming language. When this article was written we installed version 1.15.2.
Once you download the file, install the executable and you’ll have Golang ready on your system.
Go the following link and download the latest version of Git. When this article was written we installed version 2.28.0.
Once you download the file, install the executable and you’ll have Git ready on your system.
Click Start in the menu and search for the keyword Git Bash, once you find it please click on the application.
You should see the terminal loaded up.
Before we install
hugo, we will need to setup our
cd ~/ mkdir go cd go mkdir bin mkdir pkg mkdir src cd src mkdir github.com
hugovia this command:
cd ~/go/src/github.com/ mkdir gohugoio cd gohugoio git clone https://github.com/gohugoio/hugo.git cd hugo go install
hugoapplication has been installed:
Once confirmed you are ready to continue! The next few sections we will create the folder of our GitHub username, my username is “bartmika” so I am writing with it, please use your own username and follow along:
cd ~/go/src/github.com mkdir bartmika cd bartmika
Create our site. My recommendation is use the format “your-domain” + “-hugo” were “your-domain” is the name of your website and “-hugo” indicates this is a
hugoproject. Please note, my website domain is bartlomiejmika.com so I will be writing with “bartlomiejmika-hugo” with the following:
$GOPATH/bin/hugo new site bartlomiejmika-hugo cd bartlomiejmika-hugo
Create your first post.
$GOPATH/bin/hugo new posts/hello-world.md
Copy the contents from this sample post file into your file located at
Let’s confirm our site works by running the
hugo servercommand which will generate the site and run it. Please note everytime you make a change in your any file the
hugoserver will hotreload the site with your latest content. Also note the
-Dflag enables draft articles which you are writing to be displayed on the site:
hugo server -D
Open your browsers and visit http://localhost:1313/ to view your site. If something appears then congratulations you have setup your site! The next step is you’ll need to look through the project and spend time customizing it.
Thank you for reading, if you want to learn how create a website with a beautiful theme then please another article I’ve written titled “How to Start a Personal Blog With Hugo a Static Site Generator Written in Go”.