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

fix bug of being executed by running rake generate. #9

Closed
wants to merge 1 commit into from

Conversation

yszheda
Copy link
Contributor

@yszheda yszheda commented May 29, 2014

As I have commented on 365f79d plugins/sync_all_posts.rb:L2, jekyll loads every ruby files in the "plugins" folder during its initialization. Therefore, if we put our source code in the "plugins" folder, it will be run when we execute rake generate, which is an unexpectedly behavior. So I suggest to change back to the "_custom" folder where we store the ruby files in the old version.

@biaobiaoqi
Copy link
Collaborator

Thanks, it's good to eliminate such an unexpected behavior.

But it is a plugin, isn't it? Is there any solution without changing the
path? Actually, I didn't find $OCTOPRESS/custom/ in my place =(. Is that a
optional directory here?

Sorry for not replying in time for your comments, recently I've got a lot
of work to do in the lab before I can take an intership =(...

On 29 May 2014 19:49, Shuai YUAN notifications@github.com wrote:

As I have commented on 365f79d
365f79d
plugins/sync_all_posts.rb:L2
365f79d#plugins-sync_all_posts-rb-P2,
jekyll loads every ruby files in the "plugins" folder during its
initialization. Therefore, if we put our source code in the "plugins"
folder, it will be run when we execute rake generate, which is an
unexpectedly behavior. So I suggest to change back to the "_custom" folder

where we store the ruby files in the old version.

You can merge this Pull Request by running

git pull https://github.com/yszheda/octopress-syncPost master

Or view, comment on, or merge it at:

#9
Commit Summary

  • fix bug of being executed by running rake generate.

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#9.

祝一切顺利
申亚鹏

@yszheda
Copy link
Contributor Author

yszheda commented May 29, 2014

Hi biaobiaoqi,

You don't have to say sorry. As a user, I really appreciate your time
and effort to contribute to the repo. And I thank you for taking your
precious time to review the pull request.

I understand your opinion of using the "plugins" path, for it makes
the octopress directory more organized. But the side-effect is that
jekyll depends on the ruby files in the "plugins" folder, including
the source code of octopress-syncPost. Meanwhile the plugin itself
depends on the result of jekyll. Such circular dependency is quite
weird.

As for why choosing "_custom", I have noticed that it is used in the
old version of octopress-syncPost and another plugin
octopress-weibo. But I
am not sure whether it is a standard folder name for third-party
plugins. As you have pointed out, if there is a solution without
changing the path, then it should be favored over mine.

Finally, wish you everything goes well. May the force be with you! XD

Best regards,
Shuai Yuan

@huangbowen521
Copy link
Owner

_custom is not standard structure of octopress plugin. I wrote this plugin and has inspired by weibo plugin.

@yszheda yszheda closed this Jun 2, 2014
@yszheda yszheda reopened this Jun 2, 2014
@yszheda
Copy link
Contributor Author

yszheda commented Jun 2, 2014

I see, and I will figure out a way without changing the path when I have time. Thank you, Bowen!

@yszheda yszheda closed this Jun 2, 2014
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

3 participants