Using Hugo

Hugo’s pretty simple to use, but I use it so sporadically I figured I should jot down how I use it…

Note: All the following commands assume I’m in the /blog subdirectory of the repo.


I installed it with Homebrew:

$ brew install hugo

so to upgrade it I just brew update && brew upgrade.


To get hugo to render on-the-fly:

$ hugo server --watch --buildDrafts

Writing new articles

To start a new post:

$ hugo new post/

Or if it’s a static page (about/etc)

$ hugo new

Edit the page:

$ atom content/<path to .md file>

Update the categories and title fields, and set draft = true in the front matter if necessary.


Regenerate the site

$ hugo

Then git add/git commit/git push to taste.


comments powered by Disqus