Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 17 lines (13 sloc) 0.264 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash
# creates an empty post dir/file
slug=$(date +%Y-%m-%d)
slug="$slug-$2"

# cd to cat dir, so it exists
cd ./src/entries/$1
mkdir $slug
touch ./$slug/content.txt

cat <<EOF > ./$slug/content.txt
title: $2
---

EOF

echo "Created ./src/entries/$1/$slug"
Something went wrong with that request. Please try again.