From 2d7d16949a3c3e1b43edd46801d17d0c1774b322 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 12 Jun 2024 14:20:29 +0100 Subject: [PATCH] Add hugo_post.sh --- hugo_post.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 hugo_post.sh diff --git a/hugo_post.sh b/hugo_post.sh new file mode 100755 index 0000000..39ec03f --- /dev/null +++ b/hugo_post.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Simple script to create a new post in Hugo in the format "/content/posts/Post Title/index.md" as opposed to the default "/content/posts/Post Title.md" + +title="$1" + +mkdir "./content/posts/$title" +hugo new content "posts/$title/index.md"