From 67e94d999a9432e404dd773b9a6a8ef3c4b73493 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 15 Oct 2021 01:41:13 -0400 Subject: add minimal README.md and bin/ --- README.md | 20 ++++++++++++++++++++ bin/new | 12 ++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 README.md create mode 100755 bin/new diff --git a/README.md b/README.md new file mode 100644 index 0000000..e6e8106 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +pablotron.org +============= + +Add a new post: + + # easy version + bin/new post some-slug + + # longer version + hugo new --editor $EDITOR posts/$(date +%Y-%m-%d)-some-slug.md + +Add a new project: + + # easy version + bin/new project some-slug + + # longer version + hugo new --editor $EDITOR projects/some-slug.md + +Add a new menu entry: Edit `data/menu.yaml`. diff --git a/bin/new b/bin/new new file mode 100755 index 0000000..825d966 --- /dev/null +++ b/bin/new @@ -0,0 +1,12 @@ +#!/bin/bash + +# script to generate new sites and projects + +if [ "$1" = 'post' ]; then + DATE=$(date +%Y-%m-%d) + exec hugo new --editor $EDITOR posts/"$DATE"-"$2".md +elif [ "$2" = 'project' ]; then + exec hugo new --editor $EDITOR projects/"$2".md +else + echo "unknown type: $1" +fi -- cgit v1.2.3