Skip to content

Instantly share code, notes, and snippets.

View jtloong's full-sized avatar

Joshua Loong jtloong

View GitHub Profile
@jtloong
jtloong / move_to_draft.sh
Created July 31, 2018 00:39
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
@jtloong
jtloong / hexo_delete_post.sh
Last active July 31, 2018 00:38
Simple bash script to remove published posts from your Hexo blog
#!/bin/bash
POST_DIR=source/_posts/
rm $POST_DIR$1.md
rmdir $POST_DIR$1/
hexo clean
hexo generate