Octopress 简易配置
1.安装Ruby
curl -L https://get.rvm.io | bash -s stable --ruby
Install Ruby 1.9.3
rvm install 1.9.3
rvm use 1.9.3
rvm rubygems latest
如果出现红色缺少的类库,请sudo apt-get install 安装
2.设置 Octopress
git clone git://github.com/imathis/octopress.git octopress
cd octopress
ruby --version # Should report Ruby 1.9.3
gem install bundler
bundle install
rake install #Install the default Octopress theme
3.配置github pages
在github新建一个名为”username.github.com”的代码仓库
使用脚本部署
rake setup_github_pages #在此过程会询问你的代码仓库的地址,按提示完成即可
将默认的博客发布到你自己的域名
rake generate
rake deploy
rake preview #本机进行预览http://localhost:4000
4.配置Octopress
Octopress的配置主要在_config.yml文件中
5.文章编写
rake new_post["title"]
该命令将会在source/_posts目录下生成一个名为YYYY-MM-DD-post-title.markdown的文件,编辑该文件即可书写你的文章了。