imathis/octopress — pull request #289 by simensen (2011-11-18 06:28:13+00:00)
Title: Support blog content living in a completely different repository.

This code jumps off of #284 and is a much better idea of where I'm trying to go with this. It is possible that that PR can be ignored, but it is a nice reference for how I got from there to here.

Unfortunately, I ended up with a bunch of my other pull request commits embedded in this one. I think that is alright, we can change it later if needed... for now I want to use this just to show how this can work and start getting some feedback on whether or not this will ever make its way into core Octopress. :)

This PR allows me to have the following in my `_localconfig.yml`:

```yaml
---
url: http://srcmvn.com
title: Source Maven
subtitle: Code Partition for Beau Simensen
author: Beau Simensen

# Key part is overriding the default '.' to make Octopress look
# for project files (sass and source) in another location.
octopress_project_path: /home/altern8/workspaces/srcmvn.com
```

This will instruct Octopress to look in a completely different location for `sass` and `source` directories. It does this by way of some magic in `Octopress.config` that constructs most of the paths from their component parts.

Both `config.ru` and `config.rb` needed to be updated to reference some of these configuration values. `Rakefile` needed (and still needs) a lot of work to be completely compatible with these changes. Jekyll uses some of the generate files in the `_config.yml` that is now written to the (potentially relocated) `source/` directory.

This is just a start. I have the `install`, `generate`, `watch`, and `preview` tasks all working. Some of the other tasks should work out of the box, but others will need a lot of work.

I now have the guts of my site checked into its own repository and completely isolated from Octopress.

https://github.com/simensen/srcmvn.com

And the only modified file in my Octopress directory isn't even in the Octopress repository:

```
altern8@cirrus:~/workspaces/octopress$ git status
# On branch move_rakefile_configs_external_project
# Untracked files:
# (use "git add ..." to include in what will be committed)
#
#	_localconfig.yml
nothing added to commit but untracked files present (use "git add" to track)
```
My next trick will be to figure out how to get this file out of here as well and move it into my other repository. :)

I'd be super happy to discuss this direction with someone!