Static site generation template for simongriffee.com
Uses Jekyll.
jekyll serve -w
…Or with local apache pointing to sg.dev, just go to http://sg.dev in browser
rsync -exclude='.DS_Store' -cavzhe ssh ~/Sites/sg.dev/ hth@hth.webfactional.com:webapps/simongriffee/
…Or use the deploy script (after first making it executable with chmod +x deploy
):
. deploy
See this and this regarding Jekyll's mangling of timestamps
A. Make sure Jekyll and RubyGems are installed on both local and server machines.
B. On local:
~/projects/sg/.git/config
:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = [email protected]:hypertexthero/sg.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "deploy"]
url = [email protected]:~/repos/sg.git
fetch = +refs/heads/*:refs/remotes/deploy/*
[remote "all"]
url = [email protected]:~/repos/sg.git
url = [email protected]:hypertexthero/sg.git
C. On server:
Make sure these folders exist:
~/webapps/sg/stories/
~/repos/sg/
~/repos/sg.it/
Put the following in ~/repos/sg.it/hooks/post-receive
:
#!/bin/sh
GIT_REPO=$HOME/repos/sg.git
TMP_GIT_CLONE=/home/hth/tmp/sg
PUBLIC_WWW=/home/hth/webapps/sg/stories
git clone $GIT_REPO $TMP_GIT_CLONE
jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
Run this command to make it executable:
chmod +x post-receive
D. To deploy:
git add .
git commit -m 'short description of change'
git push all