Changed 'cd's to 'builtin cd's, because I have a modified cd command (cd then ls) and it can get annoying when using the Jekyll aliases.
parent
6c97585329
commit
7b1312002f
|
|
@ -1,27 +1,27 @@
|
||||||
# Open the root of your site in your vim or cd to it
|
# Open the root of your site in your vim or builtin cd to it
|
||||||
|
|
||||||
if [[ $EDITOR = "vim" ]]
|
if [[ $EDITOR = "vim" ]]
|
||||||
then alias newentry="cd $JEKYLL_LOCAL_ROOT && $EDITOR ."
|
then alias newentry="builtin cd $JEKYLL_LOCAL_ROOT && $EDITOR ."
|
||||||
else alias newentry="cd $JEKYLL_LOCAL_ROOT"
|
else alias newentry="builtin cd $JEKYLL_LOCAL_ROOT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Open the _posts/ directory for making a new blog post (seperate from above alias because not everyone uses jekyll for a blog)
|
# Open the _posts/ directory for making a new blog post (seperate from above alias because not everyone uses jekyll for a blog)
|
||||||
|
|
||||||
# if [ $editor = "vim" ]
|
# if [ $editor = "vim" ]
|
||||||
# then
|
# then
|
||||||
# alias newpost="cd $jekyll_local_root/_posts && $editor ."
|
# alias newpost="builtin cd $jekyll_local_root/_posts && $editor ."
|
||||||
# else
|
# else
|
||||||
# alias newpost="cd $jekyll_local_root"
|
# alias newpost="builtin cd $jekyll_local_root"
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
# Build and locally serve the site
|
# Build and locally serve the site
|
||||||
|
|
||||||
alias testsite="cd $JEKYLL_LOCAL_ROOT && jekyll --server --auto"
|
alias testsite="builtin cd $JEKYLL_LOCAL_ROOT && jekyll --server --auto"
|
||||||
|
|
||||||
# Build but don't locally serve the site
|
# Build but don't locally serve the site
|
||||||
|
|
||||||
alias buildsite="cd $JEKYLL_LOCAL_ROOT && rm -rf _site/ && jekyll"
|
alias buildsite="builtin cd $JEKYLL_LOCAL_ROOT && rm -rf _site/ && jekyll"
|
||||||
|
|
||||||
# Rsync the site to the remote server
|
# Rsync the site to the remote server
|
||||||
|
|
||||||
alias deploysite="cd $JEKYLL_LOCAL_ROOT && rsync -rz _site/ $JEKYLL_REMOTE_ROOT"
|
alias deploysite="builtin cd $JEKYLL_LOCAL_ROOT && rsync -rz _site/ $JEKYLL_REMOTE_ROOT"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
newpost() {
|
newpost() {
|
||||||
|
|
||||||
# 'cd' into the local jekyll root
|
# 'builtin cd' into the local jekyll root
|
||||||
|
|
||||||
cd "$JEKYLL_LOCAL_ROOT/_posts"
|
builtin cd "$JEKYLL_LOCAL_ROOT/_posts"
|
||||||
|
|
||||||
# Get the date for the new post's filename
|
# Get the date for the new post's filename
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue