i’ve been hearing a lot of Octopress so i decided to give it a shot, i like the idea behind this blogging framework, baked HTML pages instead of a PHP/MySQL, writing post in markdown format and many more so don’t be surprised if the next time you visit this site has an Octopress look and feel.
What it’s Octopress
Octopress Setup (in Mac)
rvm install 1.9.2 && rvm use 1.9.2
git clone git://github.com/imathis/octopress.git octopress cd octopress # If you use RVM, You'll be asked if you trust the .rvmrc file (say yes). ruby --version # Should report Ruby 1.9.2
If ruby –version doesn’t say you’re using Ruby 1.9.2, you may want to revisit your RVM installation.
Next, install dependencies.
gem install bundler rbenv rehash # If you use rbenv, rehash to be able to run the bundle command bundle install
Install the default Octopress theme.
Start blogging with Octopress
Octopress offers some rake tasks to create post and pages preloaded with metadata and according to Jekyll’s naming conventions, to create a new blog post run the following:
rake new_post["Hello Octopress"] # Creates source/_posts/2012-01-30-Hello-Octopress.markdown
now open the newly created file and repleace the contents with this:
--- layout: post title: "Hello Octopress" date: 2012-01-30 11:10 comments: true categories: General --- **Hello Octopress!** This an example post for more information see:
Preview your content
run the following:
rake generate # Generates posts and pages into the public directory rake watch # Watches source/ and sass/ for changes and regenerates rake preview # Watches, and mounts a webserver at http://localhost:4000
Preview your content with Powder
first we need to install Powder
gem install powder
next we install pow server with powder
$ powder install => Installs pow server
next we link the octropress folder with pow
$ powder link => Link the current dir to ~/.pow/<current_directory>
Now that you’re setup with Pow, you’ll just run rake watch and load up http://octopress.dev.
please don’t forget to visit octopress documenation for more info about it.