What happened

I got annoyed with upgrading the Ghost blog. Moreover, it’s also about keeping the underlying infrastructure running. Also over time, I understood that my type of personal side is of a very static nature. Last but not least CDN offerings and tools have evolved very much in the last years, so I have finely decided to switch over to completely Jamstack.

Installing Hugo

How i do it:

https://gohugo.io/getting-started/installing/

since I use Fedora Linux, you might be interested in other installation methods.

Generate site structure

hugo new site mysite -f yml
# if you already in target folder
hugo new site . --force -f yml

now to start hugo localy you can use:

hugo server

Add Theme

I recomend to add new themes via submodules. It’s a very nice Papermode Theme in my case.

git submodule add https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod --depth=1

First Post

In Hugo, your content should be organized in a manner that reflects the rendered website. While Hugo supports content nested at any level, all the the text content belong into the content/ folder. Check out Hugo’s Content organsiation docu

In my case this page goes into content/2021/hugo/index.md:

---
draft: true
title: 'Blog with Hugo'
url: 'hugo'
date: 2021-04-02
ShowToc: true
TocOpen: false
Summary: 'How I switched from Ghost Blog to Hugo and how you can do it too.' 
categories:
- Personal
- IT
tags:
- Hugo
- Blogging
- Jamstack
cover:
    image: "hugo_blog.png"
---
## What happened
I got annoyed...

on the top you see so called Front Matter section, this is relative big in this example, but you can have it very small if you stick to defaults. The rest is Markdown.

Netlify

Now I have some source files on my local machine and I run hugo to generate static html/css files. That’s the coles part of the Jamstack approach, you can completely avoid serverside logic and deployments. But what to do with them now?

After reading one or two comparisons I’ve decided to go with Netlify i haven’t regret it so far (3 projects already)

The docu is pretty nice and everything works like a charm.

On top of hugo I only need netlify.toml, that can be pretty small if most cases:


[build]
command = "hugo"
publish = "public"

[build.environment]
HUGO_VERSION = "0.93.0"
...

Feel free to comment if you would like to know more.