打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Octopress: a blogging framework for hackers

Octopress: a blogging framework for hackers

Installing

先安裝 rvm

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

將 rvm 指令變成 shell function

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profilesource ~/.bash_profile

安裝 Ruby 1.9.2, RubyGems

rvm install 1.9.2 && rvm use 1.9.2rvm rubygems latest

確認版本

ruby --version

下載 octopress 專案

git clone git://github.com/imathis/octopress.git octopresscd octopress

安裝 bundler

gem install bundlerbundle install

安裝預設佈景

rake install

發佈到 GitHub (免費)

先建立 GitHub Repository ,並使用 username.github.com 命名(如果是組織則用 organization.github.com),例如你的 GitHub 帳號是 john2011 就將 Repository 命名為 john2011.github.com,完成後會得到一組 GitHub Pages URL http://yourname.github.com/ (注意不能用 https: 必須用 http: )。

設定 GitHub Pages

rake setup_github_pages

以上執行後會要求 read/write url for repository :
git@github.com:yourname/yourname.github.com.git

建立及發佈

rake generaterake deploy

等待幾分鐘時間,會收到一封信:「[sslab.github.com] Page build successful」,第一次發佈會等比較久,之後每次都會直接更新。

瀏覽 http://yourname.github.com/

將 source 也加入 git

git add .git commit -m 'initial source commit'git push origin source

更新 Octopress

日後有 Octopress 新版本發佈,使用以下指令升級。

git pull octopress master     # Get the latest Octopressbundle install                # Keep gems updatedrake update_source            # update the template's sourcerake update_style             # update the template's style

常用指令

建立新文章

rake new_post["how-to-install-octopress"] 

常用語法

程式碼區塊

``` groovyprintln 1+2+3```

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Windows下搭建Octopress博客
理想的写作环境:Git+Github+Markdown+Jekyll
上传项目到GitHub
遇到 Bug 时的 30 个反应,你是哪一种?
使用WebIDE开发Android应用
rvm,gems,rubygems,bundle,gemfile,git,rake,怎么这么多概念,都是干什么用的?
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服