diff --git a/bin/newpost b/bin/newpost index bfd2ef2..0f5b6b1 100755 --- a/bin/newpost +++ b/bin/newpost @@ -5,20 +5,19 @@ set -e cd "$(dirname "$0")/../" TITLE=$1 -SLUG=echo $TITLE | iconv -t ascii//TRANSLIT | sed -r s/[~\^]+//g | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z~ -echo $SLUG -exit +SLUG=$(echo $TITLE | iconv -t ascii//TRANSLIT | sed -r s/[~\^]+//g | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z) PUBLISH_DATE=$(date --rfc-3339=seconds) FILEPATH="./content/blog/$SLUG.md" if [ ! -e $FILEPATH ]; then cat > $FILEPATH <<-EOF +++ -title = $TITLE +title = "$TITLE" date = $PUBLISH_DATE draft = false [taxonomies] +# these go in quotes, like the title tags = [] +++