Depending if you deal with a User/Organization (UO) site or a Project site (P), do :
- from your working folder
git init
git remote add origin [email protected]:userName/userName.github.io.git
(UO) orgit remote add origin [email protected]:userName/repositoryName.git
(P)jekyll new .
creates your code base- in _config.yml, set the baseurl parameter to
baseurl: ''
(UO) orbaseurl: '/repositoryName'
(P) - in .gitignore add _site, it will be versioned in the other branch
jekyll build
will create the destination folder and build site.git checkout -b sources
(UO) orgit checkout master
(P)git add -A
git commit -m "jekyll base sources"
commit your source codegit push origin sources
(UO) orgit push origin master
(P) push your sources in the appropriate branchcd _site
touch .nojekyll
, this file tells gh-pages that there is no need to buildgit init
init the repositorygit remote add origin [email protected]:userName/userName.github.io.git
(UO) orgit remote add origin [email protected]:userName/repositoryName.git
(P)git checkout master
(UO) orgit checkout -b gh-pages
(P) put this repository on the appropriate branchgit add -A
git commit -m "jekyll first build"
commit your site codegit push origin master
(UO) orgit push origin gh-pages
(P)
You now have something like Octopress does. Look at their rake file, there are some nice comments inside.