Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jtloong
Created July 31, 2018 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtloong/fe74c26f0efc5be7d407ef78d34c7609 to your computer and use it in GitHub Desktop.
Save jtloong/fe74c26f0efc5be7d407ef78d34c7609 to your computer and use it in GitHub Desktop.
A simple bash script for moving published Hexo posts back to drafts.
#!/bin/bash
POST_DIR=source/_posts/
DRAFT_DIR=source/_drafts/
mv $POST_DIR$1.md $DRAFT_DIR
mv $POST_DIR$1/ $DRAFT_DIR
hexo clean
hexo generate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment