The blog of Blog of Christian Bär

Setting up this Blog

Installing Hugo

Hugo is the static site generator I’m using for this blog. Here’s how I installed it on my Windows computer:

  • Went to https://gohugo.io/getting-started/installing
  • Decided to just download the binary (as opposed to using a package manager), so went to https://github.com/gohugoio/hugo/releases to download the ZIP file.
  • Found there was a “regular” Hugo and a hugo_extended. Decided to use “regular” (find out why below).
  • Downloaded the ZIP and copied the extracted folder to c:\program files
  • Added the full path of that folder to the PATH environment variable

Initializing the blog

After having installed Hugo I can now use it to initialize my blog. The steps listed below resulted in a working blog containing the single post setting-up-this-blog.md.

  • Opened CMD, cd’ed into the directory I wanted to put my new site into and entered hugo new site adw1blog
  • A new directory adw1blog was created and in the CMD window some helpful info about next steps were displayed
  • Added .gitignore file to the adw1blog directory
  • Run git init
  • Went to look for a theme at https://themes.gohugo.io. Overwhelmed with choice.
  • After comparing themes according to a weighted criteria matrix I decided to use the minimo theme.
  • Cd’ed into adw1blog and executed the git submodule add for the theme as in git submodule add https://github.com/mismith0227/hugo_theme_pickles themes/hugo_theme_pickles
  • Replaced adw1blog/config.toml with themes/hugo_theme_pickles/exampleSite/config.toml
  • Added the line theme = "hugo_theme_pickles" to adw1blog/config.toml
  • Created a new post by entering hugo new posts/setting-up-this-blog.md. Note that the .md is important. If you forget it, Hugo will not include this post when generating the site.
  • Entered hugo server -D
  • Opened the indicated URL (e.g. http://localhost:1313/) in the browser
  • Blog landing page appeared
  • Added favicon.ico file to adw1blog/static folder and set favicon = "favicon.ico" in the [params] section of config.toml

Additional takeaways

Misc

  • There is no need to install the Go programming language and tools to use hugo.
  • Hugo is just one file: hugo.exe. (How nice is that!)

Regular vs Extended Hugo

There is a “regular” and an “extended” version of Hugo. What’s the difference?

On the Hugo Q & A Site, user “bep” (the leader of the Hugo project) says:

  • The extended version is only needed if you want to do SASS/SCSS changes.
  • PostCSS support is in the regular version
  • You can use themes that use SASS/SCSS with the regular version provided that they have added the compiled styles to /resources in the theme

Hire me! Web frontend with JavaScript, TypeScript, React, Svelte, HTML, CSS. Backend with .Net/C#, Node.js, (MS-)SQL. I fill your resource gaps, take on whole projects and create prototypes. Yes, tell me more

Share this post!