jekyll-ai-visible-content 0.1.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 +7 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +39 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +227 -0
- data/LICENSE.txt +21 -0
- data/README.md +352 -0
- data/Rakefile +9 -0
- data/jekyll-ai-visible-content.gemspec +29 -0
- data/lib/jekyll-ai-visible-content.rb +47 -0
- data/lib/jekyll_ai_visible_content/configuration.rb +154 -0
- data/lib/jekyll_ai_visible_content/entity/organization.rb +68 -0
- data/lib/jekyll_ai_visible_content/entity/person.rb +114 -0
- data/lib/jekyll_ai_visible_content/entity/registry.rb +94 -0
- data/lib/jekyll_ai_visible_content/filters/entity_filter.rb +29 -0
- data/lib/jekyll_ai_visible_content/filters/naming_filter.rb +27 -0
- data/lib/jekyll_ai_visible_content/generators/content_graph_generator.rb +69 -0
- data/lib/jekyll_ai_visible_content/generators/entity_map_generator.rb +65 -0
- data/lib/jekyll_ai_visible_content/generators/llms_txt_generator.rb +170 -0
- data/lib/jekyll_ai_visible_content/generators/robots_txt_generator.rb +57 -0
- data/lib/jekyll_ai_visible_content/hooks/post_render_hook.rb +82 -0
- data/lib/jekyll_ai_visible_content/hooks/validate_hook.rb +49 -0
- data/lib/jekyll_ai_visible_content/json_ld/blog_posting_schema.rb +104 -0
- data/lib/jekyll_ai_visible_content/json_ld/breadcrumb_schema.rb +69 -0
- data/lib/jekyll_ai_visible_content/json_ld/builder.rb +64 -0
- data/lib/jekyll_ai_visible_content/json_ld/collection_schema.rb +47 -0
- data/lib/jekyll_ai_visible_content/json_ld/faq_schema.rb +37 -0
- data/lib/jekyll_ai_visible_content/json_ld/how_to_schema.rb +42 -0
- data/lib/jekyll_ai_visible_content/json_ld/person_schema.rb +18 -0
- data/lib/jekyll_ai_visible_content/json_ld/website_schema.rb +39 -0
- data/lib/jekyll_ai_visible_content/tags/ai_author_tag.rb +26 -0
- data/lib/jekyll_ai_visible_content/tags/ai_breadcrumb_tag.rb +50 -0
- data/lib/jekyll_ai_visible_content/tags/ai_entity_link_tag.rb +40 -0
- data/lib/jekyll_ai_visible_content/tags/ai_json_ld_tag.rb +54 -0
- data/lib/jekyll_ai_visible_content/tags/ai_related_posts_tag.rb +91 -0
- data/lib/jekyll_ai_visible_content/validators/entity_consistency_validator.rb +94 -0
- data/lib/jekyll_ai_visible_content/validators/json_ld_validator.rb +58 -0
- data/lib/jekyll_ai_visible_content/validators/link_validator.rb +27 -0
- data/lib/jekyll_ai_visible_content/version.rb +5 -0
- metadata +107 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: d6df8740bf4a545461ef47c5e1e40f2c957d0653f35980d5bd4debd69c3a2f2c
|
|
4
|
+
data.tar.gz: 1efb32d2987403177eb39b901d3c082090020a77fe328b156e92c19ac188b095
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 46ca4cd8957244c6664fdf68af90f4cf1eb37b29015672b75ecc21dd2158ef09eea295028bafe52dbce10bcc48fd0449f9c33c8cb7b8306926229efc3e71b1b8
|
|
7
|
+
data.tar.gz: 01e325c0f40da46e82c33c677fe5e910de2e5db9f43160398a95aaf223efab1bec1591042be869bf95badd11adb834c8a3a18c1024789b75e3f609537e40906c
|
data/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cursor
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
TargetRubyVersion: 3.2
|
|
3
|
+
NewCops: enable
|
|
4
|
+
SuggestExtensions: false
|
|
5
|
+
Exclude:
|
|
6
|
+
- "spec/fixtures/**/*"
|
|
7
|
+
- "vendor/**/*"
|
|
8
|
+
|
|
9
|
+
Metrics/MethodLength:
|
|
10
|
+
Max: 30
|
|
11
|
+
|
|
12
|
+
Metrics/ClassLength:
|
|
13
|
+
Max: 200
|
|
14
|
+
|
|
15
|
+
Metrics/AbcSize:
|
|
16
|
+
Max: 60
|
|
17
|
+
|
|
18
|
+
Style/Documentation:
|
|
19
|
+
Enabled: false
|
|
20
|
+
|
|
21
|
+
Layout/LineLength:
|
|
22
|
+
Max: 120
|
|
23
|
+
|
|
24
|
+
Naming/FileName:
|
|
25
|
+
Exclude:
|
|
26
|
+
- "lib/jekyll-ai-visible-content.rb"
|
|
27
|
+
|
|
28
|
+
Metrics/BlockLength:
|
|
29
|
+
Exclude:
|
|
30
|
+
- "spec/**/*.rb"
|
|
31
|
+
|
|
32
|
+
Metrics/CyclomaticComplexity:
|
|
33
|
+
Max: 20
|
|
34
|
+
|
|
35
|
+
Metrics/PerceivedComplexity:
|
|
36
|
+
Max: 20
|
|
37
|
+
|
|
38
|
+
Gemspec/DevelopmentDependencies:
|
|
39
|
+
Enabled: false
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (Unreleased)
|
|
4
|
+
|
|
5
|
+
- Initial release
|
|
6
|
+
- JSON-LD generation: Person, BlogPosting, WebSite, BreadcrumbList, FAQPage, HowTo
|
|
7
|
+
- `llms.txt` and `llms-full.txt` generation
|
|
8
|
+
- `robots.txt` generation with AI crawler policies
|
|
9
|
+
- Liquid tags: `ai_json_ld`, `ai_author`, `ai_entity_link`, `ai_related_posts`, `ai_breadcrumbs`
|
|
10
|
+
- Entity auto-linking in post content
|
|
11
|
+
- Build-time validators for entity consistency, missing metadata, orphan pages
|
|
12
|
+
- `jekyll-seo-tag` compatibility detection
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
jekyll-ai-visible-content (0.1.0)
|
|
5
|
+
jekyll (>= 4.0, < 5.0)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
addressable (2.9.0)
|
|
11
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
12
|
+
ast (2.4.3)
|
|
13
|
+
base64 (0.3.0)
|
|
14
|
+
bigdecimal (4.1.1)
|
|
15
|
+
colorator (1.1.0)
|
|
16
|
+
concurrent-ruby (1.3.6)
|
|
17
|
+
csv (3.3.5)
|
|
18
|
+
diff-lcs (1.6.2)
|
|
19
|
+
em-websocket (0.5.3)
|
|
20
|
+
eventmachine (>= 0.12.9)
|
|
21
|
+
http_parser.rb (~> 0)
|
|
22
|
+
eventmachine (1.2.7)
|
|
23
|
+
ffi (1.17.4)
|
|
24
|
+
ffi (1.17.4-aarch64-linux-gnu)
|
|
25
|
+
ffi (1.17.4-aarch64-linux-musl)
|
|
26
|
+
ffi (1.17.4-arm-linux-gnu)
|
|
27
|
+
ffi (1.17.4-arm-linux-musl)
|
|
28
|
+
ffi (1.17.4-arm64-darwin)
|
|
29
|
+
ffi (1.17.4-x86-linux-gnu)
|
|
30
|
+
ffi (1.17.4-x86-linux-musl)
|
|
31
|
+
ffi (1.17.4-x86_64-darwin)
|
|
32
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
33
|
+
ffi (1.17.4-x86_64-linux-musl)
|
|
34
|
+
forwardable-extended (2.6.0)
|
|
35
|
+
google-protobuf (4.34.1)
|
|
36
|
+
bigdecimal
|
|
37
|
+
rake (~> 13.3)
|
|
38
|
+
google-protobuf (4.34.1-aarch64-linux-gnu)
|
|
39
|
+
bigdecimal
|
|
40
|
+
rake (~> 13.3)
|
|
41
|
+
google-protobuf (4.34.1-aarch64-linux-musl)
|
|
42
|
+
bigdecimal
|
|
43
|
+
rake (~> 13.3)
|
|
44
|
+
google-protobuf (4.34.1-arm64-darwin)
|
|
45
|
+
bigdecimal
|
|
46
|
+
rake (~> 13.3)
|
|
47
|
+
google-protobuf (4.34.1-x86-linux-gnu)
|
|
48
|
+
bigdecimal
|
|
49
|
+
rake (~> 13.3)
|
|
50
|
+
google-protobuf (4.34.1-x86-linux-musl)
|
|
51
|
+
bigdecimal
|
|
52
|
+
rake (~> 13.3)
|
|
53
|
+
google-protobuf (4.34.1-x86_64-darwin)
|
|
54
|
+
bigdecimal
|
|
55
|
+
rake (~> 13.3)
|
|
56
|
+
google-protobuf (4.34.1-x86_64-linux-gnu)
|
|
57
|
+
bigdecimal
|
|
58
|
+
rake (~> 13.3)
|
|
59
|
+
google-protobuf (4.34.1-x86_64-linux-musl)
|
|
60
|
+
bigdecimal
|
|
61
|
+
rake (~> 13.3)
|
|
62
|
+
http_parser.rb (0.8.1)
|
|
63
|
+
i18n (1.14.8)
|
|
64
|
+
concurrent-ruby (~> 1.0)
|
|
65
|
+
jekyll (4.4.1)
|
|
66
|
+
addressable (~> 2.4)
|
|
67
|
+
base64 (~> 0.2)
|
|
68
|
+
colorator (~> 1.0)
|
|
69
|
+
csv (~> 3.0)
|
|
70
|
+
em-websocket (~> 0.5)
|
|
71
|
+
i18n (~> 1.0)
|
|
72
|
+
jekyll-sass-converter (>= 2.0, < 4.0)
|
|
73
|
+
jekyll-watch (~> 2.0)
|
|
74
|
+
json (~> 2.6)
|
|
75
|
+
kramdown (~> 2.3, >= 2.3.1)
|
|
76
|
+
kramdown-parser-gfm (~> 1.0)
|
|
77
|
+
liquid (~> 4.0)
|
|
78
|
+
mercenary (~> 0.3, >= 0.3.6)
|
|
79
|
+
pathutil (~> 0.9)
|
|
80
|
+
rouge (>= 3.0, < 5.0)
|
|
81
|
+
safe_yaml (~> 1.0)
|
|
82
|
+
terminal-table (>= 1.8, < 4.0)
|
|
83
|
+
webrick (~> 1.7)
|
|
84
|
+
jekyll-sass-converter (3.1.0)
|
|
85
|
+
sass-embedded (~> 1.75)
|
|
86
|
+
jekyll-watch (2.2.1)
|
|
87
|
+
listen (~> 3.0)
|
|
88
|
+
json (2.19.3)
|
|
89
|
+
kramdown (2.5.2)
|
|
90
|
+
rexml (>= 3.4.4)
|
|
91
|
+
kramdown-parser-gfm (1.1.0)
|
|
92
|
+
kramdown (~> 2.0)
|
|
93
|
+
language_server-protocol (3.17.0.5)
|
|
94
|
+
lint_roller (1.1.0)
|
|
95
|
+
liquid (4.0.4)
|
|
96
|
+
listen (3.10.0)
|
|
97
|
+
logger
|
|
98
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
99
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
|
100
|
+
logger (1.7.0)
|
|
101
|
+
mercenary (0.4.0)
|
|
102
|
+
parallel (1.28.0)
|
|
103
|
+
parser (3.3.11.1)
|
|
104
|
+
ast (~> 2.4.1)
|
|
105
|
+
racc
|
|
106
|
+
pathutil (0.16.2)
|
|
107
|
+
forwardable-extended (~> 2.6)
|
|
108
|
+
prism (1.9.0)
|
|
109
|
+
public_suffix (6.0.2)
|
|
110
|
+
racc (1.8.1)
|
|
111
|
+
rainbow (3.1.1)
|
|
112
|
+
rake (13.3.1)
|
|
113
|
+
rb-fsevent (0.11.2)
|
|
114
|
+
rb-inotify (0.11.1)
|
|
115
|
+
ffi (~> 1.0)
|
|
116
|
+
regexp_parser (2.12.0)
|
|
117
|
+
rexml (3.4.4)
|
|
118
|
+
rouge (4.7.0)
|
|
119
|
+
rspec (3.13.2)
|
|
120
|
+
rspec-core (~> 3.13.0)
|
|
121
|
+
rspec-expectations (~> 3.13.0)
|
|
122
|
+
rspec-mocks (~> 3.13.0)
|
|
123
|
+
rspec-core (3.13.6)
|
|
124
|
+
rspec-support (~> 3.13.0)
|
|
125
|
+
rspec-expectations (3.13.5)
|
|
126
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
127
|
+
rspec-support (~> 3.13.0)
|
|
128
|
+
rspec-mocks (3.13.8)
|
|
129
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
130
|
+
rspec-support (~> 3.13.0)
|
|
131
|
+
rspec-support (3.13.7)
|
|
132
|
+
rubocop (1.86.0)
|
|
133
|
+
json (~> 2.3)
|
|
134
|
+
language_server-protocol (~> 3.17.0.2)
|
|
135
|
+
lint_roller (~> 1.1.0)
|
|
136
|
+
parallel (~> 1.10)
|
|
137
|
+
parser (>= 3.3.0.2)
|
|
138
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
139
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
140
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
141
|
+
ruby-progressbar (~> 1.7)
|
|
142
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
143
|
+
rubocop-ast (1.49.1)
|
|
144
|
+
parser (>= 3.3.7.2)
|
|
145
|
+
prism (~> 1.7)
|
|
146
|
+
rubocop-capybara (2.22.1)
|
|
147
|
+
lint_roller (~> 1.1)
|
|
148
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
149
|
+
rubocop-factory_bot (2.28.0)
|
|
150
|
+
lint_roller (~> 1.1)
|
|
151
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
152
|
+
rubocop-rspec (2.31.0)
|
|
153
|
+
rubocop (~> 1.40)
|
|
154
|
+
rubocop-capybara (~> 2.17)
|
|
155
|
+
rubocop-factory_bot (~> 2.22)
|
|
156
|
+
rubocop-rspec_rails (~> 2.28)
|
|
157
|
+
rubocop-rspec_rails (2.29.1)
|
|
158
|
+
rubocop (~> 1.61)
|
|
159
|
+
ruby-progressbar (1.13.0)
|
|
160
|
+
safe_yaml (1.0.5)
|
|
161
|
+
sass-embedded (1.99.0)
|
|
162
|
+
google-protobuf (~> 4.31)
|
|
163
|
+
rake (>= 13)
|
|
164
|
+
sass-embedded (1.99.0-aarch64-linux-android)
|
|
165
|
+
google-protobuf (~> 4.31)
|
|
166
|
+
sass-embedded (1.99.0-aarch64-linux-gnu)
|
|
167
|
+
google-protobuf (~> 4.31)
|
|
168
|
+
sass-embedded (1.99.0-aarch64-linux-musl)
|
|
169
|
+
google-protobuf (~> 4.31)
|
|
170
|
+
sass-embedded (1.99.0-arm-linux-androideabi)
|
|
171
|
+
google-protobuf (~> 4.31)
|
|
172
|
+
sass-embedded (1.99.0-arm-linux-gnueabihf)
|
|
173
|
+
google-protobuf (~> 4.31)
|
|
174
|
+
sass-embedded (1.99.0-arm-linux-musleabihf)
|
|
175
|
+
google-protobuf (~> 4.31)
|
|
176
|
+
sass-embedded (1.99.0-arm64-darwin)
|
|
177
|
+
google-protobuf (~> 4.31)
|
|
178
|
+
sass-embedded (1.99.0-riscv64-linux-android)
|
|
179
|
+
google-protobuf (~> 4.31)
|
|
180
|
+
sass-embedded (1.99.0-riscv64-linux-gnu)
|
|
181
|
+
google-protobuf (~> 4.31)
|
|
182
|
+
sass-embedded (1.99.0-riscv64-linux-musl)
|
|
183
|
+
google-protobuf (~> 4.31)
|
|
184
|
+
sass-embedded (1.99.0-x86_64-darwin)
|
|
185
|
+
google-protobuf (~> 4.31)
|
|
186
|
+
sass-embedded (1.99.0-x86_64-linux-android)
|
|
187
|
+
google-protobuf (~> 4.31)
|
|
188
|
+
sass-embedded (1.99.0-x86_64-linux-gnu)
|
|
189
|
+
google-protobuf (~> 4.31)
|
|
190
|
+
sass-embedded (1.99.0-x86_64-linux-musl)
|
|
191
|
+
google-protobuf (~> 4.31)
|
|
192
|
+
terminal-table (3.0.2)
|
|
193
|
+
unicode-display_width (>= 1.1.1, < 3)
|
|
194
|
+
unicode-display_width (2.6.0)
|
|
195
|
+
webrick (1.9.2)
|
|
196
|
+
|
|
197
|
+
PLATFORMS
|
|
198
|
+
aarch64-linux-android
|
|
199
|
+
aarch64-linux-gnu
|
|
200
|
+
aarch64-linux-musl
|
|
201
|
+
arm-linux-androideabi
|
|
202
|
+
arm-linux-gnu
|
|
203
|
+
arm-linux-gnueabihf
|
|
204
|
+
arm-linux-musl
|
|
205
|
+
arm-linux-musleabihf
|
|
206
|
+
arm64-darwin
|
|
207
|
+
riscv64-linux-android
|
|
208
|
+
riscv64-linux-gnu
|
|
209
|
+
riscv64-linux-musl
|
|
210
|
+
ruby
|
|
211
|
+
x86-linux-gnu
|
|
212
|
+
x86-linux-musl
|
|
213
|
+
x86_64-darwin
|
|
214
|
+
x86_64-linux-android
|
|
215
|
+
x86_64-linux-gnu
|
|
216
|
+
x86_64-linux-musl
|
|
217
|
+
|
|
218
|
+
DEPENDENCIES
|
|
219
|
+
jekyll-ai-visible-content!
|
|
220
|
+
public_suffix (< 7.0)
|
|
221
|
+
rake (~> 13.0)
|
|
222
|
+
rspec (~> 3.12)
|
|
223
|
+
rubocop (~> 1.50)
|
|
224
|
+
rubocop-rspec (~> 2.20)
|
|
225
|
+
|
|
226
|
+
BUNDLED WITH
|
|
227
|
+
2.5.22
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Eugene Leontev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
[](https://github.com/madmatvey/jekyll-ai-visible-content/actions/workflows/ci.yml)
|
|
2
|
+
|
|
3
|
+
# jekyll-ai-visible-content
|
|
4
|
+
|
|
5
|
+
A Jekyll plugin gem that maximizes your site's discoverability by AI search systems (ChatGPT, Perplexity, Google AI Overviews, Claude). It generates rich JSON-LD structured data, `llms.txt`, semantic HTML helpers, and manages entity identity across your site.
|
|
6
|
+
|
|
7
|
+
## Why This Exists
|
|
8
|
+
|
|
9
|
+
AI search engines don't just crawl keywords — they build **entity graphs**. They link your name to your skills, your employer, your location, and your content. This plugin ensures your Jekyll site feeds those systems exactly the structured data they need, in the formats they understand best.
|
|
10
|
+
|
|
11
|
+
What `jekyll-seo-tag` does for Google snippets, this gem does for AI answer engines.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **Rich JSON-LD generation**: Person, BlogPosting, WebSite, BreadcrumbList, FAQPage, HowTo schemas
|
|
16
|
+
- **Stable entity identity**: `@id` anchors and `sameAs` linking across all pages
|
|
17
|
+
- **`llms.txt` generation**: Machine-readable site summary for LLM ingestion
|
|
18
|
+
- **AI crawler policies**: `robots.txt` with GPTBot, PerplexityBot, ClaudeBot rules
|
|
19
|
+
- **Semantic Liquid tags**: `ai_json_ld`, `ai_author`, `ai_entity_link`, `ai_related_posts`, `ai_breadcrumbs`
|
|
20
|
+
- **Entity auto-linking**: Automatically wraps known entities in semantic markup
|
|
21
|
+
- **Build-time validation**: Warns about name inconsistencies, missing metadata, orphan pages
|
|
22
|
+
- **`jekyll-seo-tag` compatible**: Detects its presence and avoids duplicate schemas
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
Add to your Jekyll site's `Gemfile`:
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
gem "jekyll-ai-visible-content"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
And to `_config.yml`:
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
plugins:
|
|
36
|
+
- jekyll-ai-visible-content
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Then run:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bundle install
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
Add this minimal configuration to `_config.yml`:
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
ai_visible_content:
|
|
51
|
+
entity:
|
|
52
|
+
name: "Your Name"
|
|
53
|
+
job_title: "Your Title"
|
|
54
|
+
description: "One-sentence description of who you are and what you do."
|
|
55
|
+
same_as:
|
|
56
|
+
- https://linkedin.com/in/your-handle
|
|
57
|
+
- https://github.com/your-handle
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
That's it. The plugin will automatically:
|
|
61
|
+
1. Inject JSON-LD into every page's `<head>`
|
|
62
|
+
2. Generate `/llms.txt` and `/llms-full.txt`
|
|
63
|
+
3. Generate `/robots.txt` allowing AI crawlers
|
|
64
|
+
4. Generate `/entity-map.json` for debugging
|
|
65
|
+
5. Validate your site's entity consistency at build time
|
|
66
|
+
|
|
67
|
+
## Full Configuration Reference
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
ai_visible_content:
|
|
71
|
+
enabled: true # Master switch
|
|
72
|
+
|
|
73
|
+
# --- Entity Identity ---
|
|
74
|
+
entity:
|
|
75
|
+
type: Person # Person | Organization
|
|
76
|
+
id_slug: "your-name" # Fragment for @id URI (auto-derived from name if omitted)
|
|
77
|
+
name: "Your Name"
|
|
78
|
+
alternate_names: # Other name forms (translations, etc.)
|
|
79
|
+
- "Alternate Name"
|
|
80
|
+
job_title: "Your Title"
|
|
81
|
+
description: "Your bio."
|
|
82
|
+
image: /assets/img/photo.jpg # Relative or absolute URL
|
|
83
|
+
email: you@example.com
|
|
84
|
+
location:
|
|
85
|
+
locality: "City"
|
|
86
|
+
country: "US" # ISO 3166-1 alpha-2
|
|
87
|
+
knows_about: # Skills/topics (used for entity linking too)
|
|
88
|
+
- Ruby on Rails
|
|
89
|
+
- PostgreSQL
|
|
90
|
+
same_as: # Links to authoritative profiles
|
|
91
|
+
- https://linkedin.com/in/handle
|
|
92
|
+
- https://github.com/handle
|
|
93
|
+
works_for:
|
|
94
|
+
type: Organization
|
|
95
|
+
name: "Company Name"
|
|
96
|
+
occupation:
|
|
97
|
+
name: "Backend Engineer"
|
|
98
|
+
location_country: "United States"
|
|
99
|
+
skills: "Ruby, PostgreSQL, AWS"
|
|
100
|
+
|
|
101
|
+
# --- JSON-LD Behavior ---
|
|
102
|
+
json_ld:
|
|
103
|
+
auto_inject: true # Inject into <head> via hook (no manual tag needed)
|
|
104
|
+
include_website_schema: true # WebSite + SearchAction on homepage
|
|
105
|
+
include_breadcrumbs: true # BreadcrumbList on all pages
|
|
106
|
+
include_blog_posting: true # BlogPosting on dated posts
|
|
107
|
+
include_faq: true # FAQPage when faq: in front matter
|
|
108
|
+
include_how_to: true # HowTo when how_to: in front matter
|
|
109
|
+
article_body: excerpt # none | excerpt | full
|
|
110
|
+
compact: false # Minify JSON-LD output
|
|
111
|
+
|
|
112
|
+
# --- AI Crawler Policies ---
|
|
113
|
+
crawlers:
|
|
114
|
+
allow_gptbot: true
|
|
115
|
+
allow_perplexitybot: true
|
|
116
|
+
allow_claudebot: true
|
|
117
|
+
allow_googlebot: true
|
|
118
|
+
allow_bingbot: true
|
|
119
|
+
custom_rules: [] # [{user_agent: "Bot", directive: "Allow", path: "/"}]
|
|
120
|
+
generate_robots_txt: true
|
|
121
|
+
|
|
122
|
+
# --- llms.txt ---
|
|
123
|
+
llms_txt:
|
|
124
|
+
enabled: true
|
|
125
|
+
title: null # Defaults to site.title
|
|
126
|
+
description: null # Defaults to site.description
|
|
127
|
+
sections: [] # [{heading: "Section", content: "text"}]
|
|
128
|
+
include_full_text: true # Also generate /llms-full.txt
|
|
129
|
+
|
|
130
|
+
# --- Internal Linking ---
|
|
131
|
+
linking:
|
|
132
|
+
enable_entity_links: true # Auto-link known entities in post body
|
|
133
|
+
entity_definitions: {} # Custom: slug -> {name, url, description}
|
|
134
|
+
max_links_per_entity_per_post: 1
|
|
135
|
+
enable_related_posts: true
|
|
136
|
+
related_posts_limit: 3
|
|
137
|
+
|
|
138
|
+
# --- Validation ---
|
|
139
|
+
validation:
|
|
140
|
+
warn_name_inconsistency: true
|
|
141
|
+
warn_missing_same_as: true
|
|
142
|
+
warn_missing_dates: true
|
|
143
|
+
warn_orphan_pages: true
|
|
144
|
+
warn_missing_descriptions: true
|
|
145
|
+
fail_build_on_error: false # true = exit 1 on validation failure
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Layout Integration
|
|
149
|
+
|
|
150
|
+
### Automatic Mode (Recommended)
|
|
151
|
+
|
|
152
|
+
With `json_ld.auto_inject: true` (the default), JSON-LD is injected into every HTML page's `<head>` automatically. No layout changes required.
|
|
153
|
+
|
|
154
|
+
### Manual Mode
|
|
155
|
+
|
|
156
|
+
Set `json_ld.auto_inject: false` and place the tag in your layout:
|
|
157
|
+
|
|
158
|
+
```html
|
|
159
|
+
<head>
|
|
160
|
+
{% ai_json_ld %}
|
|
161
|
+
</head>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Recommended Layout Structure
|
|
165
|
+
|
|
166
|
+
**`_layouts/default.html`**
|
|
167
|
+
|
|
168
|
+
```html
|
|
169
|
+
<!DOCTYPE html>
|
|
170
|
+
<html lang="{{ page.lang | default: site.lang | default: 'en' }}">
|
|
171
|
+
<head>
|
|
172
|
+
<meta charset="utf-8">
|
|
173
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
174
|
+
<title>{{ page.title }} | {{ site.title }}</title>
|
|
175
|
+
<meta name="description" content="{{ page.description | default: site.description }}">
|
|
176
|
+
<link rel="canonical" href="{{ page.canonical_url | default: page.url | absolute_url }}">
|
|
177
|
+
</head>
|
|
178
|
+
<body>
|
|
179
|
+
{% ai_breadcrumbs %}
|
|
180
|
+
{{ content }}
|
|
181
|
+
{% if page.layout == 'post' %}
|
|
182
|
+
{% ai_related_posts limit:3 %}
|
|
183
|
+
{% endif %}
|
|
184
|
+
</body>
|
|
185
|
+
</html>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**`_layouts/post.html`**
|
|
189
|
+
|
|
190
|
+
```html
|
|
191
|
+
---
|
|
192
|
+
layout: default
|
|
193
|
+
---
|
|
194
|
+
<article itemscope itemtype="https://schema.org/BlogPosting">
|
|
195
|
+
<header>
|
|
196
|
+
<h1 itemprop="headline">{{ page.title }}</h1>
|
|
197
|
+
<time itemprop="datePublished" datetime="{{ page.date | date_to_xmlschema }}">
|
|
198
|
+
{{ page.date | date: "%B %d, %Y" }}
|
|
199
|
+
</time>
|
|
200
|
+
{% if page.last_modified_at %}
|
|
201
|
+
<time itemprop="dateModified" datetime="{{ page.last_modified_at | date_to_xmlschema }}">
|
|
202
|
+
Updated: {{ page.last_modified_at | date: "%B %d, %Y" }}
|
|
203
|
+
</time>
|
|
204
|
+
{% endif %}
|
|
205
|
+
{% ai_author %}
|
|
206
|
+
</header>
|
|
207
|
+
<div itemprop="articleBody">
|
|
208
|
+
{{ content }}
|
|
209
|
+
</div>
|
|
210
|
+
</article>
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Front Matter Reference
|
|
214
|
+
|
|
215
|
+
### Posts
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
---
|
|
219
|
+
layout: post
|
|
220
|
+
title: "Optimizing PostgreSQL Queries: From 2 Seconds to 20ms"
|
|
221
|
+
date: 2025-01-15
|
|
222
|
+
last_modified_at: 2025-02-01T12:00:00+04:00
|
|
223
|
+
description: "A deep-dive into PostgreSQL query optimization."
|
|
224
|
+
image: /assets/img/posts/pg-optimization.jpg
|
|
225
|
+
author: Your Name
|
|
226
|
+
tags: [postgresql, query-optimization, performance]
|
|
227
|
+
categories: [engineering]
|
|
228
|
+
topics: # Maps to schema:about
|
|
229
|
+
- PostgreSQL
|
|
230
|
+
- Query Optimization
|
|
231
|
+
|
|
232
|
+
# Optional: generates FAQPage JSON-LD
|
|
233
|
+
faq:
|
|
234
|
+
- question: "How much can optimization improve?"
|
|
235
|
+
answer: "We achieved a 100x improvement."
|
|
236
|
+
|
|
237
|
+
# Optional: generates HowTo JSON-LD
|
|
238
|
+
how_to:
|
|
239
|
+
name: "How to Optimize PostgreSQL Queries"
|
|
240
|
+
total_time: "PT2H"
|
|
241
|
+
steps:
|
|
242
|
+
- name: "Identify slow queries"
|
|
243
|
+
text: "Use pg_stat_statements..."
|
|
244
|
+
|
|
245
|
+
# Optional: explicit related posts
|
|
246
|
+
related_slugs:
|
|
247
|
+
- rails-n-plus-one-solutions
|
|
248
|
+
---
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Pages
|
|
252
|
+
|
|
253
|
+
```yaml
|
|
254
|
+
---
|
|
255
|
+
layout: page
|
|
256
|
+
title: "Your Name — Your Title"
|
|
257
|
+
permalink: /about/
|
|
258
|
+
description: "Bio description for AI extraction."
|
|
259
|
+
entity_type: Person # Triggers full Person JSON-LD
|
|
260
|
+
image: /assets/img/photo.jpg
|
|
261
|
+
---
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Liquid Tags
|
|
265
|
+
|
|
266
|
+
| Tag | Description |
|
|
267
|
+
|-----|-------------|
|
|
268
|
+
| `{% ai_json_ld %}` | Renders JSON-LD script tag for the current page |
|
|
269
|
+
| `{% ai_author %}` | Renders semantic author markup linking to /about/ |
|
|
270
|
+
| `{% ai_entity_link "Ruby on Rails" %}` | Renders a semantic link for a known entity |
|
|
271
|
+
| `{% ai_related_posts limit:3 %}` | Renders related posts with schema markup |
|
|
272
|
+
| `{% ai_breadcrumbs %}` | Renders HTML breadcrumb navigation |
|
|
273
|
+
|
|
274
|
+
## Liquid Filters
|
|
275
|
+
|
|
276
|
+
| Filter | Description |
|
|
277
|
+
|--------|-------------|
|
|
278
|
+
| `{{ "Ruby on Rails" \| ai_slugify }}` | Converts to `ruby-on-rails` |
|
|
279
|
+
| `{{ "Ruby on Rails" \| ai_entity_url }}` | Returns the entity's topic URL |
|
|
280
|
+
| `{{ "" \| ai_entity_name }}` | Returns the configured entity name |
|
|
281
|
+
|
|
282
|
+
## Naming Conventions
|
|
283
|
+
|
|
284
|
+
### Post Files
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
_posts/YYYY-MM-DD-descriptive-slug-with-keywords.md
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
- Lowercase, hyphen-separated slugs
|
|
291
|
+
- Include primary topic keyword in slug
|
|
292
|
+
- Avoid generic slugs (`post-1`, `update`, `new-thing`)
|
|
293
|
+
|
|
294
|
+
### Titles
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
[Action] [Topic]: [Specific Outcome]
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
- "Optimizing PostgreSQL Queries: From 2 Seconds to 20ms"
|
|
301
|
+
- "Solving N+1 Queries in Rails: A Complete Guide"
|
|
302
|
+
- Include entity name in page titles (especially /about/)
|
|
303
|
+
|
|
304
|
+
### Tags
|
|
305
|
+
|
|
306
|
+
```yaml
|
|
307
|
+
tags: [postgresql, ruby-on-rails, aws, performance]
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Normalized, lowercase, hyphenated. Each tag can serve as a topic hub page.
|
|
311
|
+
|
|
312
|
+
## Generated Files
|
|
313
|
+
|
|
314
|
+
| File | Description |
|
|
315
|
+
|------|-------------|
|
|
316
|
+
| `/llms.txt` | Concise site summary for LLM consumption |
|
|
317
|
+
| `/llms-full.txt` | Full-text version with complete post bodies |
|
|
318
|
+
| `/robots.txt` | AI crawler allow rules + sitemap reference |
|
|
319
|
+
| `/entity-map.json` | Debug file showing entity mentions and cross-references |
|
|
320
|
+
|
|
321
|
+
## Build Validation
|
|
322
|
+
|
|
323
|
+
During `jekyll build`, the plugin checks for:
|
|
324
|
+
|
|
325
|
+
- **Name inconsistency**: `site.author` differs from `entity.name`
|
|
326
|
+
- **Missing sameAs**: No links to LinkedIn, GitHub, etc.
|
|
327
|
+
- **Missing dateModified**: Posts without `last_modified_at` (hurts freshness scoring)
|
|
328
|
+
- **Missing description**: Pages without `description` in front matter
|
|
329
|
+
- **Orphan pages**: Pages with zero inbound internal links
|
|
330
|
+
- **Generic titles**: Titles like "About" without entity name
|
|
331
|
+
|
|
332
|
+
Set `validation.fail_build_on_error: true` to make errors break the build in CI.
|
|
333
|
+
|
|
334
|
+
## Compatibility
|
|
335
|
+
|
|
336
|
+
- Works alongside `jekyll-seo-tag` (avoids duplicate WebSite JSON-LD)
|
|
337
|
+
- Works alongside `jekyll-sitemap` (does not generate its own sitemap)
|
|
338
|
+
- Works alongside `jekyll-feed`
|
|
339
|
+
- Requires Jekyll 4.0+ and Ruby 3.2+
|
|
340
|
+
|
|
341
|
+
## Development
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
git clone https://github.com/madmatvey/jekyll-ai-visible-content.git
|
|
345
|
+
cd jekyll-ai-visible-content
|
|
346
|
+
bundle install
|
|
347
|
+
bundle exec rspec -f d
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## License
|
|
351
|
+
|
|
352
|
+
MIT License. See [LICENSE.txt](LICENSE.txt).
|