Intended workflow#

Manual copy from old blog -> post locally -> build and publish with ‘hugo’ -> if result on my local Hugo instance matches expectations I git commit and publish to remote -> GitLab repo main branch gets updated -> Cloudflare Pages triggers a rebuild -> web pages of the blog get updated.

Steps, Difficulties and Solutions#

  • download Hugo using Snap
  • create a git repo in the blog directory
  • create a GitLab access token. Define my GitLab repo as a remote for the blog git repo. Git push to the remote. Use the GitLab access token when asked to authenticate - not the GitLab account credentials!
  • by default the main branch on GitLab is protected. For the initial ‘git push remote origin main’, I deactivated the protection feature in GitLab under Settings -> Repository -> Protected branches -> main.
  • to create blog posts, I placed them under ‘content/posts’. I placed images under ‘static/images’. I insert an image in a blog post using this syntax: ![alt_name](/images/IMG_NAME)
  • integrate mit GitLab repo with Cloudflare Pages. I spent much time troubleshooting this. I confused Cloudflare Workers with Cloudflare Pages. I should have chosen the right config option. Firefox does not display the Cloudflare dashboard correctly. Use Chrome instead.
  • I added the Hugo theme ‘Terminal’ as a git submodule. After customizing the theme, I ‘git add themes/terminal’ in addition to the staging of the files in the parent folder ‘myblog’.

Topologies I will practice inshAllah#

this one

References#