LoginSignup
27
25

More than 5 years have passed since last update.

Octopress + Github Pagesで無料ブログ

Posted at

はじめに

GitHub PagesGitHubが提供するサービスの一つで,静的ページを簡単に公開することができます(しかも無料!).また,OctopressJekyllを使ったブログ構築用フレームワークです.このGitHub PagesとOctopressを使ってブログを公開してみます.

導入手順

導入手順を簡単に書いておきます.

Octopress

公式Documentを参考に導入してみます.Git,ruby1.9.3以降,Node.jsが必要なようです.gem入れる感じなのかなと思ったらgit repositoryをcloneしてくるんですね...実装上の都合なのかな...

$ git clone git://github.com/imathis/octopress.git octopress
$ cd octopress
$ bundle install --path vendor/bundle

テーマの変更

defaultのテーマでもいいのですが,今回はwhitespaceというテーマを入れてみました.

$ git clone git://github.com/lucaslew/whitespace.git .themes/whitespace
$ rake install['whitespace'] # for zsh, use: rake install\['whitespace'\]
$ rake generate

記事の追加

記事の追加はnew_postコマンドを使います

$ rake new_post['test']

Preview

以下のコマンドで,localhost:4000でpreviewできます.

$ rake preview

Screen Shot 2015-02-01 at 16.09.12.png

GitHub Pages

Github pageを作るには,GitHub上に[username].github.ioというrepositoryを作れば良いようです.以下のコマンドを実行するとrepository urlを聞かれるので入力します.

$ rake setup_github_pages

Deploy

localで作成した記事などをdeployするにはgenerate, deployコマンドを実行します.

$ rake generate
$ rake deploy

補足

Octopress,hacker向けとか言っときながらsimpleじゃないしクソじゃねみたいな評判(A tiny rant: Jekyll vs. Octopress)も目にしましたが,とりあえず使って見ようかと思います.

参考

27
25
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
27
25