When I first installed Octopress in May 2013 it was configured for
“subdirectory deployment”: both my Octopress installation directory and
HTTP publishing reside on the same server (our school server
Today, I decided to migrate the Octopress installation directory to my Mac.
The easiest part of this migration is running
git clone from
the command line. The more challenging task is reconfiguration of the
Octopress installation directory. I spent a whole evening figuring out all
the details it is done correctly.
Using the instructions provided by Belyamani, I installed rvm and Ruby
1 2 3 4 5
Later on, I also installed POW to allow me preview the generated site locally.
Failed Reconfiguration Attempt
Because we run
raketo do many different Octopress tasks, the first file I changed was
Rakefile. Failing to understand how Compass, Jekyll, and Rackup work together, I also attempted to update value in the
public_dirvariabe, but later found out that Rackup was not able to render the page contents correctly.
I also tinkered with
_config.ymland changed the settings of
destination. Later on, after reading the
Rakefile, I learned that Jekyll’s configuration settings are defined in this file. Jekyll’s reads its input from the directory given as
sourceand generates its output into a directory given as
The next file I attempted to modify was
config.rb, the configuration file for Compass (SASS to CSS compiler). At first, I did not understand the differences between the http_xxxx_path and zzzz_dir variables. Compass Style Configuration Reference helps me understand these two groups of variables.
The fourth file is
config.ru, Rackup configuration file. I did not change anything in this file. Nevertheless, I learned that using the default setting, Rackup server will render the contents of
Now I understand that Octopress relies on the following four utilities:
- Compass, a SASS to CSS compiler that reads its input from
sassand generates stylesheets into
source/stylesheets. Related config.rb variables:
- Jekyll then reads the contents of
sourceand generates the HTML files into
- Rackup renders the HTML contents locally by reading its input from
config.ruvariables: none. The ‘public’ directory is hardcoded into the code.
- When we deploy the site to the remote server,
rsynctransfers the contents in the
During this time, I also learned the powerful feature of
set_root_dir that allows me to switch my deployment/publishing
destination from the command line.
1 2 3 4 5
Summary of Changes
|http_images_path||http_path + "images"|