How to setup a Hugo page with Github pages and Hugo

My first iteretion of this page used several Jekyll themes. I didn’t write much through the years, in 2021 I decided to refresh this site and start writing more often.

Hugo is really popular static site generator. Before Hugo I used Jekyll. Configuring Hugo to use your page on Github is little more complicated than with Jekyll.

Here you could find the tutorial.

First I use `hermit' theme, but then i switched to simple.css. Here you could find more about how to setup it with hugo.

When you use setup with gh-pages branch remember to set Jekyll theme (even when your page doesn’t use Jekyll).

Adding empty also file .nojekyll helps.

Here yuou could find interesting blogpost about guide to file structure and organisation.

How to make Hugo render drafted content?

Here you could find source for this advice/

  1. Add option to config.toml:
title = "Hugo example site"
baseurl = "https://www.example.com"
buildDrafts = true
  1. Generate drafted files during the current Hugo build
hugo server --buildDrafts

or

hugo server -D

To not generate draft content when building our static website, use one of the following command flags:

hugo --buildDrafts=false
hugo -D=false
hugo -D=F

Instead of leaving a comment, you could also contact me āœ‰ļø.