Fixing my pipeline
I want to like Hugo—or any static site generator + git system for that matter—but it doesn’t quite flow; it doesn’t feel like my own. So I checked what I was missing.
My first obstacle was starting with the empty page, so I needed to use a proper archetype:
---
title: "{{ strings.Replace (strings.Substr .Name 11) "-" " " | strings.FirstUpper }}"
date: {{ .Date }}
draft: true
author: "Luis"
tags:
-
---

But I also only wanted to type something like newpost some-name
and still get the date at the beginning of the file name,
as in 2026-02-28-some-name.md. This needed to create a shell function
(in my case in zsh), so I included the following in ~.zshrc:
newpost() {
name=post/$(date -I)-$1.md
hugo new $name
code content/$name
}
By the way, code calls Visual Studio Code from the terminal.
I still need to fix other inconveniences,
but now it is a little less annoying to write posts.