Host locally

hugo setup

Get hugo here or use your package manager to install.

Then let’s make a empty site.

1
2
3
$ hugo new site my_site
$ cd my_site 
$ git init

Get theme even

hugo-theme-even github

1
$ git submodule add https://github.com/olOwOlo/hugo-theme-even themes/even

Copy config.toml and posts from exampleSite

1
$ cp -r themes/even/exampleSite/* .

Let’s try it out locally.

1
$ hugo serve

Your website is serving at the local address (default http://localhost:1313/) mentioned in the output from terminal above.

Now you can play around by changing files. Immediate changes will be shown in your browser.

Host remotely

git push

Go to your git server (gitlab or github or whatever you like), push it there.

push to netlify

I am using netlify as a CI tool and web server.

Put below in my_site/netlify.toml

1
2
3
4
5
6
7
8
9
 netlify.toml
[build]
  publish = "public"
  command = "hugo --gc --minify"

[context.production.environment]
  HUGO_VERSION = "0.68.3"
  HUGO_ENV = "production"
  HUGO_ENABLEGITINFO = "true"

Go to netlify, register and then link to your git repostiory. Then you should be given a domain (you can change it) that hosts your website!

Alternatively, you can use github pages with travis-ci or gitlab pages with gitlab CI.

Host under your domain name

First, you need to have a domain name. I bought one from hover for slightly above 10 bucks per year. You can buy it elsewhere.

I also uses cloudflare as domain name server (DNS) instead of the default hover one.

Finally, go to your Domain Name System (DNS) settings and add a CNAME record from your domain pointing to your website. The image below is my setup on cloudflare.

cloudflare DNS setting

Be patient and wait for DNS to propagate.

If you have questions, ask your search engine first.

If you still have questions, send me an email.