Table of Contents
$ git checkout --orphan gh-pages $ rm -rf * $ rm -rf .awestruct* .sass-* .gitignore .gitmodules $ git rm --cached * $ echo "GitHub Pages placeholder" > index.html $ git add index.html .nojekyll $ git commit -m "Seed publish branch for GitHub Pages"
$ git push origin gh-pages $ git checkout master
Note
|
By pushing the gh-pages branch, you also activated GitHub Pages to publish your website. |
View your website
http://%USERNAME%.github.io/writeadapt-%USERNAME%
Append to _config/site.yml
profiles:
development:
deploy: nil #(1)
production:
base_url: http://%USERNAME%.github.io/writeadapt-%USERNAME%
ctx_path: /writeadapt-%USERNAME%
asciidoctor:
:attributes:
base_url: http://%USERNAME%.github.io/writeadapt-%USERNAME%
ctx_path: /writeadapt-%USERNAME%
imagesdir: http://%USERNAME%.github.io/writeadapt-%USERNAME%/images #(2)
deploy:
host: github_pages
branch: gh-pages
-
nil deploy config forces development as default profile
-
imagesdir must be absolute to work around Atom feed bug
Important
|
Replace %USERNAME% with your GitHub username.
|
$ git commit _config/site.yml -m "Add profile for GitHub Pages deployment" $ git push origin master