Files
utility_scripts/hugo_post.sh
2024-06-12 14:20:29 +01:00

8 lines
248 B
Bash
Executable File

#!/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"