githubのプロジェクトごとに(この例ではets-give-away)ドキュメントなどを公開したい場合orphan
のgh-pages
ブランチを作ることによって、
http(s)://<username>.github.io/<projectname>
へアクセスすると、ドキュメントが見られます。orphan
のgh-pages
ブランチに最初のcommitがしない限りgit branch
コマンドの中にgh-pages
が表示しない。
git clone [email protected]:ColdFreak/ets-give-away.git
git checkout --orphan gh-pages
git rm -rf .
echo "My Page" > index.html
git add index.html
git commit -a -m "First pages commit"
git push origin gh-pages
これでhttp://coldfreak.github.io/ets-give-away/
へアクセスするとMy Page
が表示される.
deck.js
をライブラリを使って、かっこいいプレゼンをしたいので、deck.js
を設定する必要がある。
$ cd ets-give-away && git checkout gh-pages
$ wget https://github.com/imakewebthings/deck.js/archive/latest.zip
$ unzip latest.zip
$ cp -R deck.js-latest/* .
$ rm -rf latest.zip deck.js-latest
$ cp boilerplate.html index.html
そしてコミットして、pushします。必要に応じて.gitignore
を作ったりも大丈夫。
git add .
git commit -m "first commit"
git push -u origin gh-pages
deck.js
ライブラリのboilerplate.html
ファイルの中に
<link rel="stylesheet" media="screen" href="themes/style/web-2.0.css">
を<link rel="stylesheet" media="screen" href="themes/style/neon.css">
に変更すればスタイルが変わります。
<link rel="stylesheet" media="screen" href="themes/transition/horizontal-slide.css">
を<link rel="stylesheet" media="screen" href="themes/transition/fade.css">
に変更すればスライドはfade outして、次のスライドに移る。