如果github中已经有octopress,如何设置octopress



这是我在github上的博客。

http://john-qin.github.io/

现在,我想在我的ubuntu 12.04上设置octopress。我遵循了这一页上的指示。http://octopress.org/docs/deploying/github/

我在"rake setup_github_pages"之后被卡住了。本说明书旨在为octopress建立全新的环境。我已经在github中有了它。如何提取现有的?我应该把它们放在哪里?

Octopress存储库有两个分支,sourcemaster。源分支包含用于生成博客的文件,主分支包含博客本身。

当根据Octopress设置指南初始配置本地文件夹时,主分支存储在名为_deploy的子文件夹中。由于文件夹名称以下划线开头,因此在对原始源进行git-push操作时会忽略该名称。相反,主分支(包含您的博客文章)会在rake deploy时更新。

要重新创建现有Octopress博客的本地目录结构,请按照以下说明进行操作。

首先,您需要将源分支克隆到本地octopress文件夹中。

git clone -b source git@github.com:username/username.github.com.git octopress

然后将master分支克隆到_deploy子文件夹。

cd octopress
git clone git@github.com:username/username.github.com.git _deploy 

然后运行rake安装来配置所有

gem install bundler
rbenv rehash    # If you use rbenv, rehash to be able to run the bundle command
bundle install
rake setup_github_pages

它将提示您输入存储库URL。输入存储库的读/写url(例如,'git@github.com:your_username/your_username]github.com)

你现在有一个新的本地副本你的Octopress博客。查看这篇文章了解更多信息。

最新更新