jekyll_ai_related_posts 0.1.1 → 0.1.2

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
2
  SHA256:
3
- metadata.gz: 6b3f80af93fac9879714b6ee8806b101b1a2ede2337f285b19091888a9105718
4
- data.tar.gz: 94d1b81c2c3ea6bde9628795e7ca24c1df5bf33108229d6a16cb72f336fcb676
3
+ metadata.gz: dde47b3847f5f2578a80f8f208049f912d409e7812a2927dda4ea333b0b8cd82
4
+ data.tar.gz: 9d94d4dd9695b96467349818d20f961ac9a55f9bd5c4968c3703636854d71edb
5
5
  SHA512:
6
- metadata.gz: 74cc6e541c458483e3891a3b10d0dc6f49266fec3e06312dceb733593c37c97c686e73f79e43d8c5d26e4edcf696c10f3695fc1d79e6941dceaf3983b9938f51
7
- data.tar.gz: ab0d010676d87c601cdcb8237bc1b5275ecd2ca1dc39ae2648c83e4ae729c5acd6e3d5642d1a712ad5b5017dc8864e968b3d2a9e7308f97e45499155e7f44e41
6
+ metadata.gz: 857d8f3e381b1f4f3d52c411cc5ab630f4539ab735df57b33276f5b9df0647bebe44319b3a8a2a647f75cc3910409863aeae56d412dd48827fa5116870ea7975
7
+ data.tar.gz: eab136bfd7e226dcc0dfd71c14a0a9924b5e3aa59f8c376200129b3237e39f7e47ce540d55d03a080d834ebe56306b5827de44d8e55b9f04e71aedfbc3c9b60a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.0] - 2024-04-18
3
+ - [Bugfix] Include up to 10 related posts (like native Jekyll does) instead of just 3.
4
+
5
+ ## [0.1.1] - 2024-04-23
6
+
7
+ - [Bugfix] Exception when running in cache-only mode.
8
+
9
+ ## [0.1.0] - 2024-04-23
4
10
 
5
11
  - Initial release
data/README.md CHANGED
@@ -27,6 +27,16 @@ plugins:
27
27
  - jekyll_ai_related_posts
28
28
  ```
29
29
 
30
+ You should also ignore the cache files that this plugin generates. (This will
31
+ help avoid a regeneration loop when using `jekyll serve`.)
32
+
33
+ ```yaml
34
+ exclude:
35
+ - .ai_related_posts_cache.sqlite3
36
+ - .ai_related_posts_cache.sqlite3-journal
37
+ ```
38
+
39
+
30
40
  ## Configuration
31
41
 
32
42
  All config for this plugin sits under a top-level `ai_related_posts` key.
@@ -71,6 +81,13 @@ Based on some light testing, this took me 0.5 sec per post, or about 50 sec for
71
81
  a blog with 100 posts. All subsequent runs will be faster since embeddings will
72
82
  be cached.
73
83
 
84
+ ### Performance
85
+
86
+ On an example blog with ~100 posts, this plugin produces more accurate results
87
+ than classifier-reborn (LSI) in about the same amount of time. See [this blog
88
+ post](https://www.mikekasberg.com/blog/2024/04/23/better-related-posts-in-jekyll-using-ai.html)
89
+ for details.
90
+
74
91
  ### Cost
75
92
 
76
93
  The API costs to use this plugin with OpenAI's API are minimal. I ran this
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in jekyll_ai_related_posts.gemspec
6
+ gemspec path: '../'
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 1.21"
13
+ gem "rubocop-rails-omakase", require: false
14
+
15
+ gem "debug"
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "jekyll", "~> 3.9"
6
+ gem "kramdown-parser-gfm"
7
+
8
+ # Specify your gem's dependencies in jekyll_ai_related_posts.gemspec
9
+ gemspec path: '../'
10
+
11
+ gem "rake", "~> 13.0"
12
+
13
+ gem "rspec", "~> 3.0"
14
+
15
+ gem "rubocop", "~> 1.21"
16
+ gem "rubocop-rails-omakase", require: false
17
+
18
+ gem "debug"
@@ -111,7 +111,7 @@ module JekyllAiRelatedPosts
111
111
  relative_path: post.relative_path
112
112
  } ]))
113
113
  # The first result is the post itself, with a distance of 0.
114
- rowids = results.sort_by { |r| r["distance"] }.drop(1).first(3).map { |r| r["rowid"] }
114
+ rowids = results.sort_by { |r| r["distance"] }.drop(1).first(10).map { |r| r["rowid"] }
115
115
 
116
116
  posts_by_rowid = {}
117
117
  rowids.each do |rowid|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllAiRelatedPosts
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_ai_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
  - Mike Kasberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-23 00:00:00.000000000 Z
11
+ date: 2024-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -107,6 +107,8 @@ files:
107
107
  - LICENSE.txt
108
108
  - README.md
109
109
  - Rakefile
110
+ - gemfiles/current.gemfile
111
+ - gemfiles/jekyll3.gemfile
110
112
  - lib/jekyll_ai_related_posts.rb
111
113
  - lib/jekyll_ai_related_posts/generator.rb
112
114
  - lib/jekyll_ai_related_posts/models/post.rb
@@ -119,7 +121,7 @@ metadata:
119
121
  allowed_push_host: https://rubygems.org
120
122
  homepage_uri: https://github.com/mkasberg/jekyll_ai_related_posts
121
123
  source_code_uri: https://github.com/mkasberg/jekyll_ai_related_posts
122
- changelog_uri: https://github.com/mkasberg/jekyll_ai_related_posts
124
+ changelog_uri: https://github.com/mkasberg/jekyll_ai_related_posts/blob/main/CHANGELOG.md
123
125
  post_install_message:
124
126
  rdoc_options: []
125
127
  require_paths: