D3V-Server/blog-starter/scripts/new-post.sh

12 lines
173 B
Bash
Raw Normal View History

#!/bin/sh
set -eu
if [ "${1:-}" = "" ]; then
echo "Usage: $0 my-post-slug" >&2
exit 1
fi
slug="$1"
hugo new "posts/${slug}.md"
echo "Created content/posts/${slug}.md"