Skip to content

Instantly share code, notes, and snippets.

@acairns
Created January 5, 2014 11:58
Show Gist options
  • Save acairns/8267431 to your computer and use it in GitHub Desktop.
Save acairns/8267431 to your computer and use it in GitHub Desktop.
Bash script to publish Jekyll post from _drafts into _posts
#!/bin/sh
if [ -z "$1" ]
then
echo "No draft file found"
exit
fi
mv $1 _posts/`date +"%Y-%m-%d"`-`basename $1`
@MartinThoma
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment