Blog Use and Maintenance - LemontechSA/TideSDK GitHub Wiki

Overview

The TideSDK blog is conveniently hosted on git using the awesome Octopress. We want all our developers and contributors to feel excited about our journey forward. This convenient access in our repo allows developers and contributors provides everyone with blog about their developments. It also keeps everything at the simplest level writing in markdown. Committing posts is just as easy as committing any other form of work. Please blog about your work and spread the word about our exciting project.

Getting Prerequisites Installed

Getting the prerequisites for the blog on your system is the most difficult aspect of working with the blog. Once you have what you need, posting is a snap. All will go well if you follow the following for your platform. Please follow these instructions, in minutes you will be able to get posting or modifying the blog.

OSX Snow Leopard (10.6.8)

  1. Checkout the code to ~/.rbenv
$ cd
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
  1. Add rbenv to your path
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
  1. Add rbenv init to your shell.
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
  1. Restart your shell so the path changes take effect. You can now begin using rbenv.
$ exec $SHELL
  1. A plugin is needed to use the install command for rbenv. We're going to install that first:
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git
  1. Now that the plugin is installed we can install the correct ruby on your system:
rbenv install 1.9.2-p290

OSX Lion (10.7.3)

The default compiler for OSX changed in lion to gcc llvm. This has caused issues with several builds of software. Octopress builds easily with the gcc toolchain, so we will install that first. Just run the package install available on link below:

GCC-10.7-v2.pkg

On Lion, /usr/bin/gcc is linked to /usr/bin/llvm-gcc-4.2. To build we need to ensure the right compiler is used. Once you have the gcc compiler install, do this:

export CC=/usr/bin/gcc-4.2

Now we build RVM to get our proper ruby version to use for the blog. To do this follow the instructions for OSX Snow Leopard above.

Windows

On windows yari can be used as opposed to RVM for multiple versions of Ruby

git clone git://github.com/scottmuc/yari.git yari

Once complete, setup the required Ruby environment:

yari 1.9.2

Checking out the Blog

You must have read and write access to the blog to post to it. Just clone to your system as any other project:

git clone [email protected]:TideSDK/tidesdk.github.com.git

Modifying the Configuration

Configuration settings for the blog are contained in the _config.yml file. Please do not make changes in this configuration without consultation. Once the changes have been made, commit them to git and push changes.

git commit -m 'your commit message'
git push

Then run the following commands:

rake generate
rake deploy

Creating a Post

Creating posts is easy. Just navigate to the project that you checked out and issue a command with the title of the post. For example:

rake new_post["TideSDK Release Candiate 1.2.1.RC1 Available"]

Add the post to git:

git add source/_posts

The post will appear in the source/_posts folder with some default metadata. You can change the metadata as needed. Edit the post with an available text editor. You will see a yml header is generated for the post:

---
layout: post
title: "TideSDK Release Candiate 1.2.1.RC1 Available"
date: 2012-06-12 5:59
comments: true
categories:
---

If you are working on a draft and still want to commit, add published: false to the header. Make sure to add your name for attribution as this is multi-author blog. To do this add author: Your Name. Add appropriate categories. We may need to standardize on categories moving forward.

Now you just write your post in markdown below the metadata. Inserting a <!-- more --> comment into your post will prevent the post content below this mark from being displayed on the index page for the blog posts, a “Continue →” button links to the full post.

Committing your post is easy:

git commit -a -m 'Adding new post'
git push

Now we need to deploy the blog with the updated information:

rake generate
rake deploy

Were done.

Previewing the Blog Locally

Octopress allows you to preview locally:

$ rake preview

You will see the following output:

Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.

Navigate to localhost:4000 in your browser to preview the blog.

Upgrading Octopress

Copyright and Attribution

The following copyright and attribution applies to this document:

Copyright © 2012 David Pratt (for TideSDK). All rights reserved.

CONTRIBUTORS:

  • David Pratt