Why start now

Ever since I started in software development, I’m relying on information I find on the internet and other peoples blogs for a lot of things I do. Most solutions to technical problems, architecture recommendations or resources on learning new stuff come from blog posts. Most of the time I get an idea on how to solve a problem, do some research, iterate on it, and then come to a conclusion on how something can be implemented in my current project.

Some information will end up in my personal knowledge base using Obsidian and sometimes I share content through our companies internal wiki at Confluence.

In the future, I want to publish some of my findings on this blog. I hope this helps people who have the same technical problems with not having to iterate as much as I did on some of this. Also, I find that writing things down helps me personally in understanding, learning and reflecting on information. So here we go.

Technology

As a heavy (Neo-)vim user, I wanted to be able to write my blog posts via vim either in my terminal or in a code editor like VS Code without relying on some kind of WYSIWYG editor. Also I wanted to have the posts I write as human readable text files that I can version via git, so I chose Hugo as a static site generator. That way I can just edit Markdown, version via git, compile everything into static files without the need of a special server infrastructure and host everything anywhere I can put static content.

At the moment I’m using the m10c theme for Hugo and modified the colors to resemble my favourite color theme Nord. Also I selected the nord syntax highlight theme so everything fits together nicely.

params:
  style:
    primaryColor: '#81A1C1'
    darkestColor: '#2e3440'
    darkColor: '#3b4252'
    lightColor: '#d8dee9'
    lightestColor: '#eceff4'
markup:
  highlight:
    style: nord

Theme colors excerpt from config.toml

Publishing pipeline

My publishing pipeline works as follows: First I create and edit a blog post through the hugo cli and Neovim. Then I push the changes to a git repository on GitHub. Using GitHub actions, GitHub is building the static files for my blog. I’m using Azure static web apps (free tier) for hosting everything so I was able to use the Azure/static-web-apps-deploy action that contains a method to build Hugo. Basically, I was able to copy the configuration from the tutorial at https://learn.microsoft.com/en-us/azure/static-web-apps/publish-hugo.

name: default
on: push
jobs:
  build_and_deploy_job:
    if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
    runs-on: ubuntu-latest
    name: Build and Deploy Job
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true
      - name: Build And Deploy
        id: builddeploy
        uses: Azure/static-web-apps-deploy@v1
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
          action: "upload"
          app_location: "/" 
          api_location: "api" 
          output_location: "public" 
        env:
          HUGO_VERSION: 0.111.3

The git repository is included as a source for the static web app. For me this is a nice setup so far, I will see if the setup stays that way or gets altered to fit my needs in the future.