New post #4

wants to merge 2 commits into

2 participants


No description provided.


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 tangledhelix was assigned Nov 5, 2012

@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.

@tangledhelix tangledhelix added a commit that referenced this pull request Jan 22, 2013
@tangledhelix add new_post (#4) f183dc2

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment