jekyll-tfidf-related-posts 0.1.2 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d3cfeeebb0a49a4e45daf9005cf81a424ff876d0
4
- data.tar.gz: 174cc25e49c5da1c2dc4a711f7946c16d749af47
2
+ SHA256:
3
+ metadata.gz: 5242df19b18d34ca869481d89e77ad7d811a4f6b94f9aa3315d84053c06ce290
4
+ data.tar.gz: 668c05931c4bcd013d670aeaa2ebf8ece6a275e017ab553346204fdbf4df8cad
5
5
  SHA512:
6
- metadata.gz: 4ed73df8285c8705371d9bae38997b00884632d4627bed20183ef7d26a971ccf851441ee2367aa7828f43b72c807ff42eda2d2d3f22036698b0576c7fbfde5f1
7
- data.tar.gz: 3d7113697a27a30e3ce662fab0b65385f66386d431ca718b4f757546ad2207bb5cd3d8fa03f32ba1a40b961ba142c486c929460ecedb7ba66c5111703fb3ed2c
6
+ metadata.gz: 9c1f69622cb5afa24979de7f92ab9b8dce4b4ed4bdbbc16df9f99195bbf9e14a89da653535587645fbd89e21dee0fc006373e79f8c3a57993660af166641faa4
7
+ data.tar.gz: b99f3d7d6db69e445e7348141e68f26c4feca8174b383564f362f9bb9fba2ec46d17741ffdd245161eb72d2f44ae54d25e2cb3392a4c3dbb418c147959b7e42e
data/README.md CHANGED
@@ -1,19 +1,20 @@
1
- # jekyll-tdidf-related-posts
1
+ # jekyll-tfidf-related-posts
2
2
 
3
- [![DUB](https://img.shields.io/dub/l/vibe-d.svg)]()
3
+ [![Gem Version](https://badge.fury.io/rb/jekyll-tfidf-related-posts.svg)](https://rubygems.org/gems/jekyll-tfidf-related-posts)
4
+ [![DUB](https://img.shields.io/dub/l/vibe-d.svg)](LICENSE.txt)
4
5
 
5
6
  [Jekyll](http://jekyllrb.com) plugin to show related posts based on the content, tags, and categories. The similarity is calculated using TF-IDF(term frequency-inverted document frequency). Since tags and categories are use-defined values, those are considered with higher weights than a content while calculating.
6
7
 
7
8
  ### How to install
8
9
 
9
- 1. Install the gem `jekyll-tdidf-related-posts`.
10
+ 1. Install the gem `jekyll-tfidf-related-posts`.
10
11
  ```
11
- $ gem install jekyll-tdidf-related-posts
12
+ $ gem install jekyll-tfidf-related-posts
12
13
  ```
13
- 2. Add `jekyll-tdidf-related-posts` plugin in `_config.xml`.
14
+ 2. Add `jekyll-tfidf-related-posts` plugin in `_config.xml`.
14
15
  ```yaml
15
16
  plugins:
16
- - jekyll-tdidf-related-posts
17
+ - jekyll-tfidf-related-posts
17
18
  ```
18
19
  3. Run `jekyll build` or `jekyll serve`
19
20
 
@@ -21,12 +22,14 @@ plugins:
21
22
  ### How to use
22
23
  This plugin calculates related posts and replaces `site.related_posts` containing recent 10 posts by default. So, you can render related posts by iterating `site.related_posts`.
23
24
 
24
- ```
25
+ ```java
25
26
  {% for post in site.related_posts %}
26
27
  {% include related-post.html %}
27
28
  {% endfor %}
28
29
  ```
29
30
 
31
+ > GitHub Pages supports only [these plugins](https://pages.github.com/versions/). For GitHub Pages, you need to generate your site locally and then push static files to GitHub Pages site.
32
+
30
33
  ### Configuration
31
34
 
32
35
  By default, there are 4 related posts. You can configure it in the `_config.yml`
@@ -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-tfidf-related-posts"
7
- spec.version = "0.1.2"
7
+ spec.version = "0.1.7"
8
8
  spec.authors = ["Sangsoo Nam"]
9
9
  spec.email = ["sangsoo.ted@gmail.com"]
10
10
  spec.summary = %q{Jekyll plugin to show related posts based on the content, tags, and categories.}
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.files = `git ls-files -z`.split("\x0")
16
16
  spec.require_paths = ["lib"]
17
17
 
18
- spec.add_dependency "jekyll", "~> 3.0"
18
+ spec.add_dependency "jekyll", ">= 3.0"
19
19
  spec.add_dependency "stopwords-filter", "~> 0.4"
20
20
  spec.add_dependency "fast-stemmer", "~> 1.0"
21
21
  spec.add_dependency "pqueue", "~> 2.1"
@@ -34,7 +34,7 @@ module Jekyll
34
34
  related = build_related_docs_with_score(site.config['related_posts_count'] || 4)
35
35
 
36
36
  @docs.each do |doc|
37
- doc[:post].data['related_posts'] = related[doc].map { |x| x[:post] }
37
+ doc[:post].instance_variable_set(:@related_posts,related[doc].map { |x| x[:post] })
38
38
  end
39
39
  end
40
40
 
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-tfidf-related-posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sangsoo Nam
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-06 00:00:00.000000000 Z
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
@@ -100,7 +100,7 @@ homepage: https://github.com/SangsooNam/jekyll-tfidf-related-posts
100
100
  licenses:
101
101
  - MIT
102
102
  metadata: {}
103
- post_install_message:
103
+ post_install_message:
104
104
  rdoc_options: []
105
105
  require_paths:
106
106
  - lib
@@ -115,9 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubyforge_project:
119
- rubygems_version: 2.6.11
120
- signing_key:
118
+ rubygems_version: 3.1.2
119
+ signing_key:
121
120
  specification_version: 4
122
121
  summary: Jekyll plugin to show related posts based on the content, tags, and categories.
123
122
  test_files: []