Is there a way to create custom commands or customise existing commands?

You might consider a platform-agnostic approach with npm:
https://discourse.gohugo.io/t/dates-in-post-filenames/26219/7

Disregard.