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

Compatibility with jekyll 1.0 and refactoring #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jumanji27
Copy link

plugin not working in jekyll 1.0 branch:

nazz.me #dev > jekyll serve
Configuration file: /Library/WebServer/Documents/nazz.me/_config.yml
error: wrong argument type Class (expected Module). Use --trace to view backtrace
nazz.me #dev > jekyll serve --trace
Configuration file: /Library/WebServer/Documents/nazz.me/_config.yml
/Library/WebServer/Documents/nazz.me/_plugins/related_posts.rb:63:in `include': wrong argument type Class (expected Module) (TypeError)

Plus slightly simplified plugin structure.

@lawrencewoodman
Copy link
Owner

I have just tried these changes and noticed that the tests don't pass. Any chance of ensuring the tests pass, before I accept the pull request?

@jumanji27
Copy link
Author

Tests don't pass not because of my changes in plugin, Tests don't pass because Jekyll Post class updated in 1.0.0 version, try it in your origin plugin repo (not my fork). Post class does't init in createPost method and I don't know why =/ (for the time being). I think what I can do, I'm not a great expert in minitest gem

@jnovack
Copy link

jnovack commented Jul 19, 2013

The code works for me. (did not try the tests)

@fauzieuy
Copy link

@jnovack : code works, but it's not related-post (not in same category)

@jumanji27
Copy link
Author

@fauzieuy why post not related? Same category? Post related by a tags.

@fauzieuy
Copy link

@nazz-nazz sorry, I mean post related by a tags.
see related posts in my site before comment section, this article using tags google and google-features but not related, the related post is article using tags ruby and ruby-on-rails

@jumanji27
Copy link
Author

@fauzieuy I think, plugin works a little bit wrong. Plugin not divide tags for word, it analyze tags entirely and your use case do not pass. (google and google-features different tags, ruby and ruby-on-rails too). In my fork doesn't change this process.

For more accurate, lexical sampling related posts try use default Jekyll LSI Classifier (--lsi key), but it is a very slow method.

@lawrencewoodman
Copy link
Owner

@nazz-nazz The plugin now works with Jekyll V1.0: well done for fixing it. However, the tests need to be altered and I simply don't have the time at the moment. If anyone wants to step forward and alter the tests, then I can accept this pull request.

@jumanji27
Copy link
Author

I necessarily will correct tests, but now, I don't have time too(

@fauzieuy
Copy link

@nazz-nazz : no, I mean

Article 1 have tags ruby and ruby-on-rails
Article 2 have tags google and google-features

Article 1 and Article 2 not same by tags but article 2 show on related post article 1.

@patrickwelker
Copy link

@nazz-nazz Thank you so much for working on this. Works splendid for me. I believe I can soon upgrade the Jekyll version of my live blog. Missed this plugin dearly.

@jumanji27
Copy link
Author

@fauzieuy okay, now, I see, thx :) I have tried to reproduce use case with this tags in clearly Jekyll (1.0.3 or any other) and this plugin (my fork or any other) and these two posts were not relative (both posts did't have related posts). Have you tried to do so? I think the problem is somewhere on your side.

@pattulus I use my fork for related post and Jekyll v.1.0.3. It works fine with me. I hope we will find the time to finish tests and create release.

@iloveip
Copy link

iloveip commented Mar 6, 2014

@nazz-nazz Hi Nikita, thank you very much! The only problem I'm having is that posts with the same tag but in different categories still show as related posts. Is there any way to limit related posts within the same category only?

@jumanji27
Copy link
Author

@jupiteror Hi, I don't know. This issue reason for the new topic in this repo. I don't use folders in my jekyll project (in post, of course).

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.

6 participants