imathis/octopress — pull request #603 by Neil-Smithline (2012-06-08 22:48:00+00:00)
Title: Rakefile Changes

Hey Brandon,

I thought I'd send you the ```Rakefile``` changes I have made.

The changes are pretty simple and are used to give flexibility about where ```new_post``` and ```new_page``` files are created as well as a bit more flexibility regarding the YAML frontmatter.

To be clear, I do not wish you to feel any obligation to take any of these changes. I'm simply sending them to you as I think that they may be helpful. ```Octopress``` is your baby and I wouldn't dream of trying to derail the course you want it to take. Just use your judgment and don't feel any need to explain your decisions.

1. ```data_dir```: This is what I use to keep my data in a separate directory. You can remove it if you'd like though I think setting it to a null string will provide the current behavior while leaving flexibility for the more hackerish.
1. ```new_post_dir```, ```new_page_dir```: Directories to create new pages and posts in. These are subdirectories of ```data_dir```. Setting ```new_post_dir``` to ```source/_posts``` and ```new_page_dir``` to ```source``` should provide the current property.
1. ```new_post``` task: I have modified this to keep allow for the creation of subdirectories within the ```_posts``` directory. This seems 100% compatible with Jekyll and, IMO, makes managing your posts much easier.
1. ```yaml_prefix```, ```yaml_suffix```: The value of these variables are inserted before and after the YAML frontmatter. I use them to delineate the YAML frontmatter as being raw HTML. Setting them to the empty string only adds an extra newline. I'm sure that can be corrected though I'm not a ```Rakefile``` user. I only play one on TV :-)
1.) ```yaml_misc```: Its content is inserted into the YAML frontmatter. The ```Rakefile``` I've sent you has an example of using it to set the default value of ```published``` to ```false```.

I think that is about it. With the exception of the ```Rakefile``` variable ```data_dir```, all of the directory data separation stuff that we have been discussing is ```rake``` (it's all in ```Emacs``` ^-^).

I've left in my changes to defaults such as the default file suffixes. I have no way to test Markdown so I didn't want to risk sending you a file that was broken. I figure you can just tweak the suffixes and make sure I didn't break anything.

Once again, take what you think makes things better, leave the rest. I don't understand the direction Octopress is going in so I'm not sure if what I've sent you is appropriate.

Neil