https://pages.github.com/
今回はGithub.ioにサイトを立ててみます。
1アカウント1サイト持てるようです。
リポジトリを作成
まずusername.github.ioという名前のリポジトリをgithubに作成します。私の場合だと、kazusa-qooq.github.ioになります。
リポジトリのクローン
作成しましたらリポジトリをクローンします。
:~/workspace/blog $ git clone https://github.com/kazusa-qooq/kazusa-qooq.github.io
Cloning into 'kazusa-qooq.github.io'...
warning: You appear to have cloned an empty repository.
Checking connectivity... done.
:~/workspace/blog $
テストページを作る
プロジェクトに移動してindex.htmlを作ります。
qooq:~/workspace/blog $ cd kazusa-qooq.github.io/
:~/workspace/blog/kazusa-qooq.github.io (master) $ echo "Hallo World" > index.html
:~/workspace/blog/kazusa-qooq.github.io (master) $ cat index.html
Hallo World
:~/workspace/blog/kazusa-qooq.github.io (master) $
アップロードする
作成したファイルをgithubにアップします。
add -all して commit して push するだけです。
:~/workspace/blog/kazusa-qooq.github.io (master) $ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
index.html
nothing added to commit but untracked files present (use "git add" to track)
:~/workspace/blog/kazusa-qooq.github.io (master) $ git add -A
:~/workspace/blog/kazusa-qooq.github.io (master) $ git status
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: index.html
:~/workspace/blog/kazusa-qooq.github.io (master) $ git commit -m "First"
[master (root-commit) 77923e0] First
1 file changed, 1 insertion(+)
create mode 100644 index.html
:~/workspace/blog/kazusa-qooq.github.io (master) $ git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 223 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/kazusa-qooq/kazusa-qooq.github.io
* [new branch] master -> master
:~/workspace/blog/kazusa-qooq.github.io (master) $
アクセスする
https://kazusa-qooq.github.io/
できました!
簡単ですね。ではまた今度。