Rebuilding my personal site with Netlify and Hugo

This post goes over how and why I transitioned from GitHub Pages to Netlify and Hugo for my personal blog

Image for post
Image for post
Image for post
Image for post

Traffic

Image for post
Image for post

Why make a change?

Previous workflow

How does hosting a site with Netlify work?

What are the alternatives to Netlify?

Set up a custom domain on Netlify

Image for post
Image for post
Image for post
Image for post

Picking a static site generator

Some perks of Hugo:

Concerns about Hugo:

Build a site with Hugo

$ brew install hugo
Image for post
Image for post
$ hugo --help hugo is the main command, used to build your Hugo site. Hugo is a Fast and Flexible Static Site Generator built with love by spf13 and friends in Go. Complete documentation is available at http://gohugo.io/. Usage: hugo [flags] hugo [command] Available Commands: check Contains some verification checks config Print the site configuration convert Convert your content to different formats deploy Deploy your site to a Cloud provider. env Print Hugo version and environment info gen A collection of several useful generators. help Help about any command import Import your site from others. list Listing out various types of content mod Various Hugo Modules helpers. new Create new content for your site server A high performance webserver version Print the version number of Hugo
$ hugo new site connorleech.info 
$ cd connorleech.info
$ git init && git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke $ echo 'theme = "ananke"' >> config.toml
$ hugo server -D
baseURL = "https://connorleech.info/" 
languageCode = "en-us"
title = "Connor Leech"
theme = "ananke"
[permalinks]
posts = "blog/:title"

Deploy a Hugo site to Netlify

$ cp -a connor11528-blog/source/_posts/. connorleech.info/content/posts/
5:28:57 PM: Executing user command: hugo 5:28:57 PM: Started building sites ... 
5:28:57 PM: ERROR: 2019/12/29 01:28:57 template.go:477: template: /opt/build/repo/themes/ananke/layouts/_default/baseof.html:9: function "hugo" not defined
5:28:57 PM: ERROR: 2019/12/29 01:28:57 template.go:477: template: theme/partials/site-footer.html:4: function "now" not defined
5:28:57 PM: ERROR: 2019/12/29 01:28:57 template.go:477: template: theme/partials/site-navigation.html:19: function "partialCached" not defined
5:28:57 PM: Error: Error building site: unsupported file extension .toml
Image for post
Image for post
Image for post
Image for post

Conclusion

Engineer, writer and community organizer. I built Employbl to help candidates get jobs in the Bay Area: https://employbl.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store