Mark Szymanski | 0097a1e | 2010-11-01 20:04:28 -0500 | [diff] [blame] | 1 | # Open the root of your site in your vim or cd to it |
Mark Szymanski | c92a5f2 | 2010-10-23 10:57:31 -0500 | [diff] [blame] | 2 | |
Mark Szymanski | db5a47e | 2010-11-01 20:06:57 -0500 | [diff] [blame] | 3 | if [ $EDITOR = "vim" ] |
Mark Szymanski | 0097a1e | 2010-11-01 20:04:28 -0500 | [diff] [blame] | 4 | then |
| 5 | alias newentry="cd $JEKYLL_LOCAL_ROOT && $EDITOR ." |
| 6 | else |
| 7 | alias newentry="cd $JEKYLL_LOCAL_ROOT" |
Mark Szymanski | 689afd9 | 2010-11-01 20:05:33 -0500 | [diff] [blame] | 8 | fi |
Mark Szymanski | c92a5f2 | 2010-10-23 10:57:31 -0500 | [diff] [blame] | 9 | |
| 10 | # Open the _posts/ directory for making a new blog post (seperate from above alias because not everyone uses jekyll for a blog) |
| 11 | |
Mark Szymanski | db5a47e | 2010-11-01 20:06:57 -0500 | [diff] [blame] | 12 | if [ $EDITOR = "vim" ] |
Mark Szymanski | 689afd9 | 2010-11-01 20:05:33 -0500 | [diff] [blame] | 13 | then |
| 14 | alias newpost="cd $JEKYLL_LOCAL_ROOT/_posts && $EDITOR ." |
| 15 | else |
| 16 | alias newpost="cd $JEKYLL_LOCAL_ROOT" |
| 17 | fi |
Mark Szymanski | c92a5f2 | 2010-10-23 10:57:31 -0500 | [diff] [blame] | 18 | |
| 19 | # Build and locally serve the site |
| 20 | |
| 21 | alias testsite="cd $JEKYLL_LOCAL_ROOT && jekyll --server --auto" |
| 22 | |
| 23 | # Build but don't locally serve the site |
| 24 | |
| 25 | alias buildsite="cd $JEKYLL_LOCAL_ROOT && rm -rf _site/ && jekyll" |
| 26 | |
| 27 | # Rsync the site to the remote server |
| 28 | |
Mark Szymanski | 2182027 | 2010-10-23 11:10:37 -0500 | [diff] [blame] | 29 | alias deploysite="cd $JEKYLL_LOCAL_ROOT && rsync -rz _site/ $JEKYLL_REMOTE_ROOT" |