At first, Install Hugo.
Install Hugo (official)
Follow the procedures below:
You can skip step1.
About step3, some websites might explain using
git clone instead of
You can choose either, but I recommend you to use
git submodule because using it enables you tracking the newest version of the theme.
If you chose
git clone, You should add themes folder to .gitignore like below:
echo 'themes/' >> .gitignore
If you chose
gohugo-theme-ananke as your theme, you should see below:
Of course you can add your first content with
hugo new posts/foobar.md
but I recommend you to copy the contents of
gohugo-theme-ananke and tinker them.
If you wanna upload the website to your GitHub Pages, you should modify
baseURL = "https://<YOUR-USER-NAME>.github.io/"
<YOUR-USER-NAME> should be your user name of github.
And if you are tracking the Quick start you should add the line below like official procedure:
theme = "ananke"
and hugo starts soon.
Let's access to
localhost:1313 with your web browser.
You can see the aesthetic of the website.
When you done your website, please execute
Hugo builds your website under
Before you upload it, you should add
public to your
echo 'public/' >> .gitignore
and move to public folder
git push whole contents of the
git init git remote add origin https://github.com/<YOUR-USER-NAME>/<YOUR-USER-NAME>.github.io
Then, access your website