12 lines
173 B
Bash
12 lines
173 B
Bash
|
|
#!/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"
|