How Just saved my bacon
·1 min
I’m really bad at remembering stuff which I don’t do on a regular basis. Like writing blog posts.
Recently I’ve discovered just, a command runner similar to make, but with a nicer syntax.
Now I can simply write
$ just write How Just saved my bacon
hugo new content "posts/2025/12/how-just-saved-my-bacon.md"
Content "/Users/redtoad/workspace/blog/content/posts/2025/12/how-just-saved-my-bacon.md" created
and voilĂ , a new blog post is created for me in the right folder with the right name.
Should I ever forget which commands are available, I can simply run
$ just --list
The corresponding justfile looks like this:
image := "ghcr.io/redtoad/blog:latest"
year := datetime("%Y")
month := datetime("%m")
# list all available commands
default:
@just --list
# create a new blog post with title
write *title:
hugo new content "posts/{{year}}/{{month}}/{{lowercase(kebabcase(title))}}.md"
# run Hugo locally to see content
serve:
hugo server --buildDrafts --buildFuture --buildExpired
# build the Docker image
build:
git submodule init
git submodule update
docker build -t {{image}} .
# remove all generated files
clean:
rm -rf public/
BTW Writing this blog post took under 4 min.