Getting started with the Hugo static site generator

This blog is being powered by a static content generator called Hugo and hosted on GitHub Pages. Getting Hugo up and running was relatively easy. Download the relevant version and installation was just copying it to a folder.

Once installed, create a new site:

hugo new site mySite

In the site folder edit the config.toml file to change the baseUrl, the language and the title.

Use git to clone a theme from the available themes to a folder under the themes folder in your site.

A page can be added by typing:

hugo new post/somepost.md

and then editing the file generated under the content/post folder. You might want to remove the “draft” line".

To test the site, run:

hugo server -t thethemename

where the thethemename is the name of the theme folder and then go to the url given in the console output.

To build the static content:

hugo -t thethemename --destination=/somefolder

where somefolder is the name of the folder to build the content to.

This can then be pushed to GitHub.

Side note: You might also want to “git config core.safecrlf false” on the github folder to remove some CRLF warnings when pushing on Windows.

Links

Hugo

Available themes

Random Posts

School work experience

In most UK schools we have the concept of work experience.


Read More

Downstream to upstream

How do we move from solving downstream reactive problems to upstream proactive solutions?


Read More

Goggles give back sight

This short clip is pretty remarkable. A young woman lost most of her sight due to a brain tumour. All she has left is a small blurry circle in her right eye. With the use of some AR goggles and some very clever tech she was able to read for the first time in years - very moving.


Read More