hugo
Blog with Hugo
Written on
| Tags:
hugo
Switch from jekyll
When I first want to build a blog and counter jekyll, I’m really happy about the result for only working for days. It’s easy, fast and GitHub Pages supported. I found this great tutorial on YouTube by Thomas Bradley. It really makes everything clear and simple to build basic framework of the website. With a little help from Bootstrap
, I, even never build a website myself, finished first version of my blog within a week. Then I found Hugo
, same static website generator by golang
. It’s really fast compare to jekyll
, Hugo benchmark. It completed 5,000 posts in 7 second. It could be a main advantage of hugo inherit by golang
.
Pros
- Super fast
- More flexible syntax than liquid template
- Since uploading content not source code, no wait until GitHub Pages render your pages
- Theme feature, easily switch and package theme
Cons
- Not GitHub Page supported
- No default theme to show content
- Docs is not as clear and easy to follow as jekyll
Quick start
- Download and install hugo from Hugo.
- Create a new folder for your website and
hugo new site .
orhugo new site sitename
, hugo will create for you. - Create a sample post by
hugo new post/postname.md
, hugo will createfront matter
for you. - Download theme from Hugo Themes, unzip and put it in
sitename/themes
- Let hugo know which theme you’re using, by adding
theme = "themename"
toconfig.toml
- Fire up hugo by
hugo
orhugo serve
, usinghugo
will build your website underpublic
folder,hugo serve -w
wont’ create anything, just visit site atlocalhost:1313
.-w
to watch the website change and reflect immediately.