jekyll-llms-generator 0.1.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: ded1a72f3e590ee00a81fa796362243e35b58e419f158f851a7ca4db19905ce8
4
- data.tar.gz: 89c1b7b0b246359871a47b872c92e198f85bd8d61d6bf9f72ca8e9c49ce2dca9
3
+ metadata.gz: 61e7af91faf01c8a0511432b9a91cb7981314a6721dc9e0290eb65d9709fe141
4
+ data.tar.gz: 562bc7af8bc4fdec062271fafb8ebe9b15e0caa90752f467f5c013439f8f2e39
5
5
  SHA512:
6
- metadata.gz: d1238923ed9780e6a0314b9b2a03407b40036948f1ee241147e4820036d2db3c5167972d970f468803853eca4613ee2881e4d3471df8ccf4222889563d026f96
7
- data.tar.gz: 284fd114b4d63d660c3619ecbb1352057035b8ef9ed1ed6708eb1bdbeef78932849f9a111ef96acebfbb2fc120a79d87e990d671f9c0a6a4076707eb40869495
6
+ metadata.gz: 597fd7a9fe2f2ef89770f8aa8dad5fbc6069e12478d914b4a6192c1b3f66af800285ee04bc5ab3bce031c7e83e3e9669783013721afe979bc0175201ea760bdd
7
+ data.tar.gz: dc583c5de51a5092d2c905b02a8a04552a9bdb9cd2b0b0646799c034225cbc306ec0c57fbd1742e27afea3ec05a54a0f46c1e2d25d0daba0024fe8dd32345fbc
data/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [0.1.0] - 2025-07-08
5
+ ## [0.2.0] - 2026-08-20
6
+
7
+ ### Changed
8
+ - `llms.txt`: descriptions now use first complete sentence instead of hard 200-character truncation — cleaner, more natural output for LLMs
9
+ - `llms-full.txt`: entries now use `### [Title](url)` headings, `> description` blockquotes, and `---` separators between articles, making article boundaries unambiguous for LLM parsers
10
+
11
+ ## [0.1.0] - 2026-08-20
6
12
 
7
13
  ### Added
8
14
  - Initial release
@@ -45,6 +45,12 @@ module Jekyll
45
45
  lines << intro.strip
46
46
  end
47
47
 
48
+ # Link to full version if enabled — lets crawlers discover llms-full.txt
49
+ if @config["full"]
50
+ lines << ""
51
+ lines << "[Full content version](#{site_base_url}/llms-full.txt)"
52
+ end
53
+
48
54
  sections = @config["sections"] || []
49
55
  sections.each do |section|
50
56
  items = collect_section_items(section)
@@ -136,15 +142,22 @@ module Jekyll
136
142
  end
137
143
 
138
144
  def doc_to_item(doc)
139
- description = doc.data["description"] ||
140
- doc.data["tagline"] ||
141
- (doc.data["excerpt"]&.output ? strip_html(doc.data["excerpt"].output) : nil) ||
142
- (doc.excerpt ? strip_html(doc.excerpt.output) : nil)
145
+ raw_desc = doc.data["description"] ||
146
+ doc.data["tagline"] ||
147
+ (doc.data["excerpt"]&.output ? strip_html(doc.data["excerpt"].output) : nil) ||
148
+ (doc.excerpt ? strip_html(doc.excerpt.output) : nil)
149
+
150
+ description = if raw_desc
151
+ cleaned = raw_desc.strip.gsub(/\s+/, " ")
152
+ # Use first sentence rather than a hard char truncation
153
+ first_sentence = cleaned.match(/\A.+?[.!?](?:\s|$)/)
154
+ first_sentence ? first_sentence[0].strip : cleaned
155
+ end
143
156
 
144
157
  {
145
158
  title: doc.data["title"],
146
159
  url: "#{site_base_url}#{doc.url}",
147
- description: description&.strip&.gsub(/\s+/, " ")&.slice(0, 200),
160
+ description: description,
148
161
  content: doc.content
149
162
  }
150
163
  end
@@ -158,11 +171,14 @@ module Jekyll
158
171
 
159
172
  def format_item_full(item)
160
173
  lines = []
161
- lines << "- [#{item[:title]}](#{item[:url]})"
174
+ lines << "### [#{item[:title]}](#{item[:url]})"
175
+ desc = item[:description]
176
+ lines << "" << "> #{desc}" if desc && !desc.empty?
162
177
  if item[:content] && !item[:content].empty?
163
178
  stripped = strip_html(item[:content]).strip.gsub(/\s+/, " ")
164
- lines << "" << stripped << ""
179
+ lines << "" << stripped
165
180
  end
181
+ lines << "" << "---"
166
182
  lines.join("\n")
167
183
  end
168
184
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllLlmsGenerator
4
- VERSION = "0.1.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-llms-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Chance