LoginSignup
1
2

More than 5 years have passed since last update.

Github.ioにサイトを立ててみよう

Posted at

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/
image

できました!
簡単ですね。ではまた今度。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2