Why

I’ve been wanting to do this for such a long time. Recently I had the synchronicity of multiple sources1 reminding me to start blogging or journaling. I see the importance for documenting your own path for reflection, self improvement and the chance for others to learn.

What

As an engineer I would like to share my learnings with my future self So that I can reflect on my journey and improve my workflow for the next journey.

It needs to be public <www.johannesprinz.com> to force a certain level of quality by social pressure.

How

Choose a blog engine

There are so many to choose from. A quick google gave me the following to look at:

  • Ghost Heard about these a few years ago when I first thought about blogging. This was my first intro to containers then too as they had a development container to launch from.
  • Wordpress This comes up under almost any related “build a website” search.
  • Jekyll Written in Ruby.
  • Hugo

I have settled with Hugo, as I am a fan of markdown for authoring and it had easy quick-start guides in all areas I have either familiarity in or wish to learn more about.

Setup authoring environment

I work with a lot of frameworks and languages in my daily engineering workflow. Keep my main machine as clean as possible is very important to me. What I have found to keep the global scope of my machine clean and free of tooling and framework clutter is container based development. For this I use Docker, Visual Studio Code and the Remote development container extension. As it turns out hugo has a development container.

  1. Follow the [Remote development in Containers](https://code.visualstudio.com/docs/remote/containers-tutorial tutorial to get setup.

  2. Setup your workspace and launch VS Code

    mkdir blog
    cd blog
    git init
    code .
    
  3. Once VisualStudio Code launches setup hugo development container

    • Open Command Pallet CTRL + p
      Type &gt;remote-containers.createDevContainerFile

      Type >remote-containers.createDevContainerFile

      Show all definitions

      Show all definitions

      Search for hugo

      Search for hugo

      Reopen in container

      Reopen in container

  4. From here you can follow the Hugo quick start guide post the install step.

Setup pipelines

Now that I can create content I need to enable publishing. I tried publishing to Github pages. I followed this video Creating a Blog with Hugo and Github in 10 minutes.

⚠️ For this to work I needed to name my published repo by the same name as the github page url “https://[UserName].github.io”.

But then I found this Tutorial to Publish a Hugo site to Azure Static Web Apps Preview. This setup a static site publishing git hub actions workflow with preview environments within the Pull Request process. Playing with a few GitHub repository settings to secure my main branch I was all set.

Drafting the first post

At this stage I though I’d nailed it. If someone asked me “When will the first post be published?”, I would of replied “Tomorrow”. Finding the topic for this one was easy. And here are all the challenges I stumbled across writing my first post.

  • Spell checking.
  • Finding the right theme
  • Learning Hugo Hugo introduction
    • Syntax highlighting
      • Using Hugo short codes
    • Rendering of html tags like <kbd>home</kbd>
      • Using Hugo short codes
    • Styling and customising themes

All this ended up taking another few weeks to resolve to a point where I felt it was good enough to publish.

What I learned