Blog Site Setup
- Host locally
- Host remotely
- Host under your domain name
Get hugo here or use your package manager to install.
Then let’s make a empty site.
Get theme even
Copy config.toml and posts from exampleSite
Let’s try it out locally.
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.
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
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.
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.
Author Alex Lai
LastMod 2021-07-11 (65a4863)