A Fish Script for Creating New Hugo Posts

I’ve streamlined my blogging process using Hugo by automating tasks with the Fish Shell. I created a simple script that saves me a few minutes each time I write a new post. It automatically starts a new Hugo post and opens it in Helix editor, allowing me to write, save, and publish with ease. File name: new_til.fish function new_til -d "Create a new Today I learned post on Hugo" set blog_path ~/sites/blog set date_str (date +%Y-%m-%d) cd $blog_path hugo new til/$date_str-$argv[1].md hx content/til/$date_str-$argv[1].md end Just save the script into ~./config/fish/functions and to start a new Today I Learned post, just type $ new_til post_title ...

11 February 2025 · 1 min