Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New post #4

Closed
wants to merge 2 commits into from
Closed

New post #4

wants to merge 2 commits into from

Conversation

stardiviner
Copy link

No description provided.

@tangledhelix
Copy link
Owner

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.

@ghost ghost assigned tangledhelix Nov 5, 2012
@stardiviner
Copy link
Author

@tangledhelix Right, the condition is complicated now...

@tangledhelix
Copy link
Owner

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 added a commit that referenced this pull request Jan 22, 2013
@tangledhelix
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants