No description provided.
improve if match
add new_post task
I like the general approach here, but I don't think we can safely test on the presence of a directory called .git -- not everybody is storing their Octopress source in a repo, and not everybody using a repo uses Git. (Could be hg, svn, or something else.)
There's probably a way to grab this path from rake or using a tree walk or something. I'll have to think on that. If anybody wants to tinker on that idea and send a pull request for it, feel free. I will note that when you run rake new_post['title'], it outputs the directory that Rakefile lives in. If that path can be grabbed from the output, then it can be used to load the file into a buffer.
@tangledhelix Right, the condition is complicated now...
I have this mostly working, though it breaks down if you use a comma in the post name (a known bug in octopress itself, see imathis/octopress#910). I need to test some more and clean it up, then I'll merge it. The comma bug will have to be fixed upstream, unfortunately, and it might extend to other characters.
add new_post (#4)
Added new_post support. As noted, putting a comma in the post title breaks things, but other than that it seems to work, even with e.g. an exclamation mark.