Sign in to follow this  
Followers 0

HPR - HPR1370: Blogging With Octopress

1 post in this topic

Blogging with OctopressStatic html site generators automate many of the tedious steps that are necessaryto create website. Octopress is a static html generator that automates many of the tedious tasks of static html site generators, and comes with a number of reasonable presets, configured right out of the box.Static HTML Site Generators I looked at:Jekyll: (HPR1203)Octopress: I settled on octopress for the following reasons:SASS Sass adds additional functionality to css such as variables, mixins, scopes, and was a tool that I had previously worked with.Twitter Bootstrap Twitter bootstrap is a set of templates that produce nice looking pages that are standards compliant, and adaptive so that they look good at any screen resolution. HTML5 Video Plugin I ended up creating my own, but Octopress has a HTML5 video plugin. Unfortunately this only supported H264 video, so I created my own to serve H264, Webm, and Ogv.Deployment scripts Octopress comes with rsync, and github pages support out of the box, so you can deploy your site with very little effort. Requirements:Ruby 1.9.3 or aboveGitHTML knowledgeText Editor & TerminalInstall Requirements:In Ubuntu 12.04 I did the following:sudo apt-get install emacs git zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev libruby1.9.1 libreadline-devInstall ruby through rbenvrbenv ( clone ~/.rbenv# set environment in ~/.bash_profile. Change this to ~/.zshrc if using zshellecho 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profileecho 'eval "$(rbenv init -)"' >> ~/.bash_profilesource ~/.bash_profile # You can change to .zshrc or .bashrcInstall ruby-build to make installing ruby easygit clone ~/.rbenv/plugins/ruby-buildInstall rubyrbenv install 1.9.3-p194rbenv rehashOctopresshttp://octopress.orgInstall Octopressgit clone git:// octopresscd octopressrbenv local 1.9.3-p194 Install Ruby Requirementsgem install bundlerrbenv rehashbundle install What is rake?Rake is like make but for ruby. Use rake scripts to setup and preview blograke -T # list all available rake tasksrake install # install themes and default configrake preview # generate and view siteOpen localhost:4000 in your webbrowserSetup Deploymentrake set_root_dir['blog-test']rake setup_github_pages rake generate# Change the following url to point to your repositorygit remote add origin config branch.master.remote origingit add .git commit -m "initial commit"git push origin masterrake deploy # this is where the magic happensConfigure Blogemacs _config.yml# Edit title, author, subtitleCreate First Post & Basic workflow:rake new_postemacs postgit add .git commit -m "added new post"Publish Blograke deploy

Go to this episode


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0