android.moparisthebest.org/source/docs/setup/index.markdown
2011-08-03 17:48:33 +02:00

1.9 KiB

layout title date sidebar footer
page Octopress Setup July 18 2011 false false

Create a new repository for your website then open up a terminal and follow along. If you plan to host your site on Github Pages for a user or organization, make sure the repository is named your_username.github.com or your_organization.github.com.

    mkdir my_octopress_site
    cd my_octopress_site
    git init
    git remote add octopress git://github.com/imathis/octopress.git
    git pull octopress master
    git remote add origin your/repository/url
    git push origin master

Next, if you're using Github pages for users or organizations, create a source branch and push to origin source.

    git checkout -b source
    git push origin source

The source branch is created to have somewhere to store the source of your site. GitHub expects the generated site to be pushed to the master branch of your GitHub repository so that branch needs to stay clean. As we will see later, in the Deploying Octopress section, a "link" to the master branch will be created in the _deploy directory in which the generated site will end up.

Next, setup an RVM and install dependencies.

    rvm rvmrc trust
    rvm reload
    bundle install

Install the default Octopress theme,

    rake install

What to Commit?

Now that you've installed the source and sass directories add them to your git repository, commit and push.

    git add .
    git commit -m 'Installed Octopress theme'
    git push

Whenever you write a new post, or make changes to your blog, be sure to commit and push those changes.

See also Configuring Octopress, Blogging with Octopress and Deploying Octopress