jekyll-related-posts 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2802d28e9109784b9d9aed5987459d7c085b29e
4
- data.tar.gz: b4ec98641cbe32e590b2a6aa428013c5aa50b266
3
+ metadata.gz: 2a729a7cb913084f97ada3b6fc4761dea03d1a2c
4
+ data.tar.gz: 5b865e025c2b4059f7c5eeadc0ec1a191fa6a48d
5
5
  SHA512:
6
- metadata.gz: 70ad01243ce8f17f133d3c56cf2d55bb5316881b2fb50d13c442fb0cb9953528a07a2dde7c304ce4b9ecda543c1bb83257923b96f628697b93804cd3af5320f1
7
- data.tar.gz: d0c17c9d025e12c51df2ce7d4ddfe0a6d15baf63454a6e09052906342d4acdf8d5e1d4c2bfb1adf970eedf6eb0621a7f60cfcfb7c3a107da67c0ec0a380016b7
6
+ metadata.gz: bd1e1f53feef2b41325e720afe3d10ffee633bd77beeef30d7cdd269fb76186cf5f6b111b6b5d030374330dbc503a136b414650d9e1e0a949778e022fa6a284a
7
+ data.tar.gz: f882db6d725eb59b384933e40454d7281504234978b2e1a5f9f4e373ceb9fb49c162ba352f9c3c5abbe9644bd8bb8468294bf7795dd24d9a62ed1bc0115f58cf
data/README.md CHANGED
@@ -19,7 +19,7 @@ and [LSI](https://en.wikipedia.org/wiki/Latent_semantic_indexing).
19
19
 
20
20
  ## How to install
21
21
 
22
- Initialy you had to install the plugin manually, however the plugin is a
22
+ Initially you had to install the plugin manually, however the plugin is a
23
23
  gem now - follow instructions to install the plugin:
24
24
 
25
25
  1. Install the gem `jekyll-related-posts`:
@@ -72,7 +72,7 @@ In your `_config.yml` file (under `related:`) you can configure:
72
72
 
73
73
  You can configure weights of words providing dictionary with them to
74
74
  `weights`. In example weight of `2` means for term frequency algorithm
75
- that the word occured twice as much in the document as in reality.
75
+ that the word occurred twice as much in the document as in reality.
76
76
 
77
77
  ## Benchmark
78
78
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "jekyll-related-posts"
7
- spec.version = "0.1.1"
7
+ spec.version = "0.1.2"
8
8
  spec.authors = ["Amadeusz Juskowiak"]
9
9
  spec.email = ["juskowiak@amadeusz.me"]
10
10
  spec.summary = %q{Proper related posts plugin for Jekyll - uses document correlation matrix on TF-IDF (optionally with Latent Semantic Indexing).}
@@ -29,7 +29,7 @@ Liquid template for each post is rendered and <related-posts /> is replaced with
29
29
 
30
30
  spec.add_runtime_dependency "jekyll", "~> 3.0"
31
31
  spec.add_runtime_dependency "liquid", "~> 3.0"
32
- spec.add_runtime_dependency "tokenizer", "~> 0.1"
32
+ spec.add_runtime_dependency "tokenizer", "~> 0.3"
33
33
  spec.add_runtime_dependency "stopwords-filter", "~> 0.3"
34
34
  spec.add_runtime_dependency "fast-stemmer", "~> 1.0"
35
35
  spec.add_runtime_dependency "pqueue", "~> 2.1"
@@ -18,7 +18,7 @@ module Jekyll
18
18
  def initialize
19
19
  @posts = Array.new
20
20
  @keywords = Array.new
21
- @tokenizer = Tokenizer::Tokenizer.new(:en)
21
+ @tokenizer = Tokenizer::WhitespaceTokenizer.new(:en)
22
22
  @stopwords_filter = Stopwords::Snowball::Filter.new('en')
23
23
  end
24
24
 
@@ -42,6 +42,7 @@ module Jekyll
42
42
 
43
43
  @posts.each do |post|
44
44
  filename = File.join(site.config['destination'], post[:url])
45
+ filename = File.join(filename, 'index.html') if File.directory? filename
45
46
  rendered = File.read(filename)
46
47
 
47
48
  output = template.render('related_posts' => related[post])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-related-posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amadeusz Juskowiak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-13 00:00:00.000000000 Z
11
+ date: 2016-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.1'
61
+ version: '0.3'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.1'
68
+ version: '0.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: stopwords-filter
71
71
  requirement: !ruby/object:Gem::Requirement