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 +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/jekyll/llms_txt_generator.rb +23 -7
- data/lib/jekyll-llms-generator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 61e7af91faf01c8a0511432b9a91cb7981314a6721dc9e0290eb65d9709fe141
|
|
4
|
+
data.tar.gz: 562bc7af8bc4fdec062271fafb8ebe9b15e0caa90752f467f5c013439f8f2e39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
|
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 << "
|
|
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
|
|