LoginSignup
6
6

More than 5 years have passed since last update.

OctopressをWindowsに入れる

Posted at

Github Pagesをブログに出来るOctopressを入れたのでメモ。

Rubyのインストール

http://rubyinstaller.org/downloads
からRubyとDevKitをダウンロード

Rubyをインストーラを使ってRubyをインストール

DevKitを適当なフォルダ(C:\Devkitとか)に解凍して、
cmdでruby dk.rb initを実行

作成されたconfig.ymlにインストールしたRubyのパスが記載されている
(されていなければ手動で追加する)ことを確認し、
ruby dk.rb install

Octopressのインストール

適当なフォルダで
bash
git clone git://github.com/imathis/octopress.git
cd octopress
bundle install

windowsだと変なことになるみたいなのでRakefileの
system "echo 'My Octopress Page is coming soon …' > index.html"
という行を、
system "echo 'My Octopress Page is coming soon ;' > index.html"
に変える。

Github Pagesの作成

Githubで、ユーザ名.github.ioというリポジトリを作る。
古い資料だと.comとなってますが、ioになったらしいです。

Octopressのセットアップ

bundle exec rake setup_github_pages
bundle exec rake install

途中でPagesのことを聞かれるので、先ほど作った自分のページを指定しましょう。

コンテンツのアップロード

コンパイル
bundle exec rake generate
デプロイ
bundle exec rake deploy

プレビュー

bundle exec rake preview
http://localhost:4000/でプレビューできるよ!

6
6
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
6
6