jekyll-theme-zer0 0.4.0 → 0.6.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.
@@ -0,0 +1,401 @@
1
+ ---
2
+ generated_at: '2025-10-10 16:52:40'
3
+ overview:
4
+ total_posts: 2
5
+ total_pages: 60
6
+ total_content: 62
7
+ total_categories: 19
8
+ total_tags: 47
9
+ total_words: 45101
10
+ average_words_per_post: 727.4
11
+ categories:
12
+ - - Documentation
13
+ - 4
14
+ - - How-To
15
+ - 3
16
+ - - Development
17
+ - 3
18
+ - - docker
19
+ - 2
20
+ - - quickstart
21
+ - 2
22
+ - - Features
23
+ - 2
24
+ - - gpt breaking
25
+ - 1
26
+ - - Testing
27
+ - 1
28
+ - - Tutorial
29
+ - 1
30
+ - - News-Demo
31
+ - 1
32
+ - - deployment
33
+ - 1
34
+ - - github
35
+ - 1
36
+ - - jekyll
37
+ - 1
38
+ - - Quick Start
39
+ - 1
40
+ - - jekyll-theme
41
+ - 1
42
+ - - bootstrap
43
+ - 1
44
+ - - about
45
+ - 1
46
+ - - development
47
+ - 1
48
+ - - themes
49
+ - 1
50
+ tags:
51
+ - - jekyll
52
+ - 15
53
+ - - mermaid
54
+ - 4
55
+ - - docker
56
+ - 4
57
+ - - bootstrap
58
+ - 3
59
+ - - tutorial
60
+ - 2
61
+ - - ruby
62
+ - 2
63
+ - - automation
64
+ - 2
65
+ - - ci/cd
66
+ - 2
67
+ - - aipd
68
+ - 2
69
+ - - devops
70
+ - 2
71
+ - - dff
72
+ - 2
73
+ - - dry
74
+ - 2
75
+ - - kis
76
+ - 2
77
+ - - news-site
78
+ - 1
79
+ - - web-development
80
+ - 1
81
+ - - port
82
+ - 1
83
+ - - travis ci
84
+ - 1
85
+ - - github pages
86
+ - 1
87
+ - - custom domain
88
+ - 1
89
+ - - netlify
90
+ - 1
91
+ - - disqus
92
+ - 1
93
+ - - comments
94
+ - 1
95
+ - - diagram
96
+ - 1
97
+ - - highlighting
98
+ - 1
99
+ - - highlight.js
100
+ - 1
101
+ - - liquid
102
+ - 1
103
+ - - mathjax
104
+ - 1
105
+ - - mathematic
106
+ - 1
107
+ - - pagination
108
+ - 1
109
+ - - performance
110
+ - 1
111
+ - - nanobar
112
+ - 1
113
+ - - progress bar
114
+ - 1
115
+ - - security
116
+ - 1
117
+ - - sharethis
118
+ - 1
119
+ - - social share
120
+ - 1
121
+ - - markdown
122
+ - 1
123
+ - - testing
124
+ - 1
125
+ - - quality assurance
126
+ - 1
127
+ - - diagrams
128
+ - 1
129
+ - - documentation
130
+ - 1
131
+ - - setup
132
+ - 1
133
+ - - development
134
+ - 1
135
+ - - ai-powered
136
+ - 1
137
+ - - remote-theme
138
+ - 1
139
+ - - github-pages
140
+ - 1
141
+ - - about
142
+ - 1
143
+ - - ai-automation
144
+ - 1
145
+ content_breakdown:
146
+ post: 2
147
+ page: 60
148
+ monthly_distribution:
149
+ 2016-01: 2
150
+ 2016-11: 1
151
+ 2017-08: 2
152
+ 2017-12: 1
153
+ 2018-09: 1
154
+ 2019-06: 7
155
+ 2022-06: 2
156
+ 2023-03: 1
157
+ 2023-11: 1
158
+ 2024-03: 1
159
+ 2024-05: 1
160
+ 2024-06: 1
161
+ 2025-01: 3
162
+ 2025-07: 2
163
+ 2025-09: 3
164
+ 2025-10: 1
165
+ word_statistics:
166
+ 2000-01-01-index.md:
167
+ words: 1033
168
+ type: post
169
+ title: 'Zer0-Mistakes News Network: Building Dynamic News Sites with Jekyll'
170
+ 2024-06-17-wizard-topples-capitalist-dominance-ingeniously.md:
171
+ words: 298
172
+ type: post
173
+ title: Wizard Topples Capitalist Dominance Ingeniously
174
+ STATS_ENHANCEMENT_SUMMARY.md:
175
+ words: 801
176
+ type: page
177
+ title: STATS_ENHANCEMENT_SUMMARY
178
+ add-floating-back-to-top-button.md:
179
+ words: 293
180
+ type: page
181
+ title: Add Floating Back-to-Top button
182
+ automated-version-build-system.md:
183
+ words: 1027
184
+ type: page
185
+ title: Comprehensive Gem Automation System
186
+ comprehensive-gem-automation-system.md:
187
+ words: 1363
188
+ type: page
189
+ title: Comprehensive Gem Automation System
190
+ index.md:
191
+ words: 596
192
+ type: page
193
+ title: zer0-mistakes Jekyll Theme
194
+ jekyll.md:
195
+ words: 4387
196
+ type: page
197
+ title: Jeykll
198
+ statistics-dashboard.md:
199
+ words: 1178
200
+ type: page
201
+ title: Statistics Dashboard Feature
202
+ bamr87.md:
203
+ words: 65
204
+ type: page
205
+ title: bamr87
206
+ config.md:
207
+ words: 56
208
+ type: page
209
+ title: Jekyll Configuration
210
+ sitemap.md:
211
+ words: 16
212
+ type: page
213
+ title: Sitemap
214
+ stats.md:
215
+ words: 161
216
+ type: page
217
+ title: Site Statistics Portal
218
+ theme.md:
219
+ words: 26
220
+ type: page
221
+ title: Bootstrap Theme Examples
222
+ footer.md:
223
+ words: 1501
224
+ type: page
225
+ title: Footer Layout
226
+ cannot-start-jekyll-at-specific-port.md:
227
+ words: 301
228
+ type: page
229
+ title: Cannot Start Jekyll at Specific Port
230
+ continuously-deploy-jekyll-website-to-gitHub-pages-with-travis-ci.md:
231
+ words: 598
232
+ type: page
233
+ title: Continuously Deploy Jekyll to GitHub Pages with Travis-CI
234
+ deploying-jekyll-website-to-netlify.md:
235
+ words: 417
236
+ type: page
237
+ title: Deploying Jekyll Website to Netlify
238
+ deploying-personal-website-with-custom-domain.md:
239
+ words: 273
240
+ type: page
241
+ title: Deploying Personal Website with Custom Domain
242
+ jekyll-comments-with-disqus.md:
243
+ words: 542
244
+ type: page
245
+ title: Jekyll - Comments with Disqus
246
+ jekyll-config.md:
247
+ words: 1335
248
+ type: page
249
+ title: Configuration Options | Jekyll • Simple, blog-aware, static sites
250
+ jekyll-diagram-with-mermaid.md:
251
+ words: 583
252
+ type: page
253
+ title: Jekyll Mermaid Integration Tutorial
254
+ jekyll-frontmatter-cms.md:
255
+ words: 16
256
+ type: page
257
+ title: Jekyll Frontmatter CMS
258
+ jekyll-highlighting.md:
259
+ words: 467
260
+ type: page
261
+ title: Jekyll - Highlighting
262
+ jekyll-liquid.md:
263
+ words: 404
264
+ type: page
265
+ title: Jekyll - Liquid
266
+ jekyll-math-symbols-with-mathjax.md:
267
+ words: 678
268
+ type: page
269
+ title: Jekyll - Math Symbols with MathJax
270
+ jekyll-pagination.md:
271
+ words: 493
272
+ type: page
273
+ title: Jekyll - Pagination
274
+ jekyll-performance-optimization.md:
275
+ words: 243
276
+ type: page
277
+ title: Jekyll - Performance Optimization
278
+ jekyll-progress-bar.md:
279
+ words: 237
280
+ type: page
281
+ title: Jekyll - Progress Bar
282
+ jekyll-security.md:
283
+ words: 395
284
+ type: page
285
+ title: Jekyll - Security
286
+ jekyll-social-share-buttons-with-sharethis.md:
287
+ words: 363
288
+ type: page
289
+ title: Jekyll - Social Share Buttons with ShareThis
290
+ jekyll-social-share-buttons.md:
291
+ words: 438
292
+ type: page
293
+ title: Jekyll - Social Share Buttons
294
+ jekyll-usage-and-customization.md:
295
+ words: 1654
296
+ type: page
297
+ title: Jekyll - Usage and Customization
298
+ mermaid-native-markdown.md:
299
+ words: 747
300
+ type: page
301
+ title: Mermaid with Native Markdown Syntax
302
+ mermaid-test-suite.md:
303
+ words: 740
304
+ type: page
305
+ title: Mermaid Test Suite
306
+ mermaid.md:
307
+ words: 995
308
+ type: page
309
+ title: Mermaid Diagrams in Jekyll
310
+ github-setup.md:
311
+ words: 1046
312
+ type: page
313
+ title: GitHub Setup & Deployment
314
+ jekyll-setup.md:
315
+ words: 1290
316
+ type: page
317
+ title: Jekyll Setup
318
+ machine-setup.md:
319
+ words: 3347
320
+ type: page
321
+ title: Machine Setup
322
+ index.html:
323
+ words: 213
324
+ type: page
325
+ title: All posts
326
+ AUTOMATED_VERSION_SYSTEM.md:
327
+ words: 734
328
+ type: page
329
+ title: AUTOMATED_VERSION_SYSTEM
330
+ CHANGELOG-MERMAID-v2.md:
331
+ words: 1410
332
+ type: page
333
+ title: CHANGELOG-MERMAID-v2
334
+ CHANGELOG.md:
335
+ words: 1122
336
+ type: page
337
+ title: CHANGELOG
338
+ CICD_STATUS_REPORT.md:
339
+ words: 1161
340
+ type: page
341
+ title: CICD_STATUS_REPORT
342
+ CODE_OF_CONDUCT.md:
343
+ words: 1004
344
+ type: page
345
+ title: CODE_OF_CONDUCT
346
+ CONTRIBUTING.md:
347
+ words: 3199
348
+ type: page
349
+ title: CONTRIBUTING
350
+ IMPLEMENTATION_SUMMARY.md:
351
+ words: 902
352
+ type: page
353
+ title: IMPLEMENTATION_SUMMARY
354
+ README.md:
355
+ words: 1904
356
+ type: page
357
+ title: zer0-mistakes
358
+ RELEASE-NOTES-v0.3.0.md:
359
+ words: 1136
360
+ type: page
361
+ title: RELEASE-NOTES-v0.3.0
362
+ URL_CONFIGURATION_GUIDE.md:
363
+ words: 451
364
+ type: page
365
+ title: URL_CONFIGURATION_GUIDE
366
+ about.md:
367
+ words: 78
368
+ type: page
369
+ title: About
370
+ blog.md:
371
+ words: 51
372
+ type: page
373
+ title: Blog
374
+ contact.md:
375
+ words: 45
376
+ type: page
377
+ title: Contact
378
+ privacy-policy.md:
379
+ words: 38
380
+ type: page
381
+ title: Privacy Policy
382
+ release_notes.md:
383
+ words: 38
384
+ type: page
385
+ title: release_notes
386
+ seed_prompt.md:
387
+ words: 991
388
+ type: page
389
+ title: seed_prompt
390
+ services.md:
391
+ words: 48
392
+ type: page
393
+ title: Services
394
+ terms-of-service.md:
395
+ words: 41
396
+ type: page
397
+ title: Terms of Service
398
+ 404.html:
399
+ words: 132
400
+ type: page
401
+ title: '404'
@@ -0,0 +1,275 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'yaml'
5
+ require 'date'
6
+ require 'fileutils'
7
+
8
+ # Statistics Generator for Jekyll Site
9
+ # Analyzes site content and generates comprehensive statistics
10
+
11
+ class SiteStatisticsGenerator
12
+ def initialize(site_root = '.')
13
+ @site_root = File.expand_path(site_root)
14
+ @posts_dir = File.join(@site_root, '_posts')
15
+ @pages_dir = File.join(@site_root, 'pages')
16
+ @collections_dirs = [
17
+ File.join(@site_root, '_quests'),
18
+ File.join(@site_root, '_docs'),
19
+ File.join(@site_root, '_projects')
20
+ ]
21
+ @output_file = File.join(@site_root, '_data', 'content_statistics.yml')
22
+
23
+ @stats = {
24
+ 'generated_at' => Time.now.strftime('%Y-%m-%d %H:%M:%S'),
25
+ 'overview' => {},
26
+ 'categories' => {},
27
+ 'tags' => {},
28
+ 'content_breakdown' => {},
29
+ 'monthly_distribution' => {},
30
+ 'word_statistics' => {}
31
+ }
32
+ end
33
+
34
+ def generate!
35
+ puts "🔍 Analyzing site content..."
36
+
37
+ analyze_posts
38
+ analyze_pages
39
+ analyze_collections
40
+ calculate_overview_metrics
41
+ sort_and_finalize_data
42
+ write_statistics_file
43
+
44
+ puts "✅ Statistics generated successfully!"
45
+ puts "📊 Results saved to: #{@output_file}"
46
+ print_summary
47
+ end
48
+
49
+ private
50
+
51
+ def analyze_posts
52
+ posts_pattern = File.join(@posts_dir, '**', '*.{md,markdown,html}')
53
+ posts_pattern2 = File.join(@pages_dir, '_posts', '**', '*.{md,markdown,html}')
54
+
55
+ post_files = Dir[posts_pattern] + Dir[posts_pattern2]
56
+
57
+ puts "📝 Found #{post_files.length} post files"
58
+
59
+ post_files.each do |file|
60
+ process_content_file(file, 'post')
61
+ end
62
+ end
63
+
64
+ def analyze_pages
65
+ # Look for standalone pages (not in _posts)
66
+ pages_pattern = File.join(@pages_dir, '**', '*.{md,markdown,html}')
67
+ page_files = Dir[pages_pattern].reject { |f| f.include?('_posts') }
68
+
69
+ # Also check root level pages
70
+ root_pages = Dir[File.join(@site_root, '*.{md,markdown,html}')]
71
+ page_files += root_pages
72
+
73
+ puts "📄 Found #{page_files.length} page files"
74
+
75
+ page_files.each do |file|
76
+ process_content_file(file, 'page')
77
+ end
78
+ end
79
+
80
+ def analyze_collections
81
+ @collections_dirs.each do |dir|
82
+ next unless Dir.exist?(dir)
83
+
84
+ collection_name = File.basename(dir).gsub(/^_/, '')
85
+ collection_files = Dir[File.join(dir, '**', '*.{md,markdown,html}')]
86
+
87
+ puts "📚 Found #{collection_files.length} #{collection_name} files"
88
+
89
+ collection_files.each do |file|
90
+ process_content_file(file, collection_name)
91
+ end
92
+ end
93
+ end
94
+
95
+ def process_content_file(file_path, content_type)
96
+ return unless File.file?(file_path)
97
+
98
+ content = File.read(file_path)
99
+
100
+ # Extract front matter
101
+ if content =~ /\A---\s*\n(.*?)\n---\s*\n(.*)\z/m
102
+ front_matter_str = $1
103
+ body_content = $2
104
+
105
+ begin
106
+ front_matter = YAML.safe_load(front_matter_str, permitted_classes: [Date, Time]) || {}
107
+ rescue YAML::SyntaxError => e
108
+ puts "⚠️ YAML error in #{file_path}: #{e.message}"
109
+ return
110
+ rescue Psych::DisallowedClass => e
111
+ # Try again with basic safe_load
112
+ begin
113
+ front_matter = YAML.safe_load(front_matter_str) || {}
114
+ rescue => e2
115
+ puts "⚠️ YAML parsing error in #{file_path}: #{e2.message}"
116
+ return
117
+ end
118
+ end
119
+ else
120
+ # No front matter found
121
+ front_matter = {}
122
+ body_content = content
123
+ end
124
+
125
+ # Skip drafts
126
+ return if front_matter['draft'] == true
127
+
128
+ # Count this content
129
+ @stats['content_breakdown'][content_type] ||= 0
130
+ @stats['content_breakdown'][content_type] += 1
131
+
132
+ # Process categories
133
+ categories = front_matter['categories'] || front_matter['category']
134
+ if categories
135
+ categories = [categories] unless categories.is_a?(Array)
136
+ categories.each do |category|
137
+ next if category.nil? || category.to_s.strip.empty?
138
+ category_str = category.to_s.strip
139
+ @stats['categories'][category_str] ||= 0
140
+ @stats['categories'][category_str] += 1
141
+ end
142
+ end
143
+
144
+ # Process tags
145
+ tags = front_matter['tags'] || front_matter['tag']
146
+ if tags
147
+ tags = [tags] unless tags.is_a?(Array)
148
+ tags.each do |tag|
149
+ next if tag.nil? || tag.to_s.strip.empty?
150
+ tag_str = tag.to_s.strip.downcase
151
+ @stats['tags'][tag_str] ||= 0
152
+ @stats['tags'][tag_str] += 1
153
+ end
154
+ end
155
+
156
+ # Process dates for monthly distribution
157
+ if front_matter['date']
158
+ begin
159
+ # Handle different date formats
160
+ date_value = front_matter['date']
161
+ if date_value.is_a?(String)
162
+ date = Date.parse(date_value)
163
+ elsif date_value.respond_to?(:to_date)
164
+ date = date_value.to_date
165
+ else
166
+ date = Date.parse(date_value.to_s)
167
+ end
168
+
169
+ month_key = date.strftime('%Y-%m')
170
+ @stats['monthly_distribution'][month_key] ||= 0
171
+ @stats['monthly_distribution'][month_key] += 1
172
+ rescue => e
173
+ puts "⚠️ Date parsing error in #{file_path}: #{e.message} (date: #{front_matter['date']})"
174
+ # Skip this date
175
+ end
176
+ end
177
+
178
+ # Count words in content
179
+ word_count = count_words(body_content)
180
+ @stats['word_statistics'][File.basename(file_path)] = {
181
+ 'words' => word_count,
182
+ 'type' => content_type,
183
+ 'title' => front_matter['title'] || File.basename(file_path, '.*')
184
+ }
185
+ end
186
+
187
+ def count_words(content)
188
+ # Remove markdown syntax and count words
189
+ text = content.gsub(/[#*_`\[\](){}]/, ' ') # Remove markdown syntax
190
+ .gsub(/!\[.*?\]\(.*?\)/, ' ') # Remove images
191
+ .gsub(/\[.*?\]\(.*?\)/, ' ') # Remove links
192
+ .gsub(/```.*?```/m, ' ') # Remove code blocks
193
+ .gsub(/`.*?`/, ' ') # Remove inline code
194
+ .gsub(/<!--.*?-->/m, ' ') # Remove comments
195
+ .gsub(/\s+/, ' ') # Normalize whitespace
196
+ .strip
197
+
198
+ text.split.length
199
+ end
200
+
201
+ def calculate_overview_metrics
202
+ total_content = @stats['content_breakdown'].values.sum
203
+ total_words = @stats['word_statistics'].values.sum { |stat| stat['words'] }
204
+
205
+ @stats['overview'] = {
206
+ 'total_posts' => @stats['content_breakdown']['post'] || 0,
207
+ 'total_pages' => @stats['content_breakdown']['page'] || 0,
208
+ 'total_content' => total_content,
209
+ 'total_categories' => @stats['categories'].keys.length,
210
+ 'total_tags' => @stats['tags'].keys.length,
211
+ 'total_words' => total_words,
212
+ 'average_words_per_post' => total_content > 0 ? (total_words.to_f / total_content).round(1) : 0
213
+ }
214
+ end
215
+
216
+ def sort_and_finalize_data
217
+ # Sort categories and tags by count (descending)
218
+ @stats['categories'] = @stats['categories'].sort_by { |_, count| -count }.to_h
219
+ @stats['tags'] = @stats['tags'].sort_by { |_, count| -count }.to_h
220
+
221
+ # Sort monthly distribution by date
222
+ @stats['monthly_distribution'] = @stats['monthly_distribution'].sort.to_h
223
+
224
+ # Convert to arrays for Jekyll (categories and tags)
225
+ @stats['categories'] = @stats['categories'].map { |name, count| [name, count] }
226
+ @stats['tags'] = @stats['tags'].map { |name, count| [name, count] }
227
+ end
228
+
229
+ def write_statistics_file
230
+ # Ensure _data directory exists
231
+ FileUtils.mkdir_p(File.dirname(@output_file))
232
+
233
+ # Write YAML file
234
+ File.open(@output_file, 'w') do |file|
235
+ file.write(@stats.to_yaml)
236
+ end
237
+ end
238
+
239
+ def print_summary
240
+ puts "\n📊 STATISTICS SUMMARY"
241
+ puts "=" * 50
242
+ puts "📝 Total Posts: #{@stats['overview']['total_posts']}"
243
+ puts "📄 Total Pages: #{@stats['overview']['total_pages']}"
244
+ puts "📚 Total Content: #{@stats['overview']['total_content']}"
245
+ puts "📂 Categories: #{@stats['overview']['total_categories']}"
246
+ puts "🏷️ Tags: #{@stats['overview']['total_tags']}"
247
+ puts "📝 Total Words: #{@stats['overview']['total_words'].to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse}"
248
+ puts "📊 Average Words/Post: #{@stats['overview']['average_words_per_post']}"
249
+
250
+ if @stats['categories'].any?
251
+ puts "\n🏆 TOP CATEGORIES:"
252
+ @stats['categories'].first(5).each_with_index do |(name, count), index|
253
+ puts " #{index + 1}. #{name}: #{count} posts"
254
+ end
255
+ end
256
+
257
+ if @stats['tags'].any?
258
+ puts "\n🏷️ TOP TAGS:"
259
+ @stats['tags'].first(10).each_with_index do |(name, count), index|
260
+ puts " #{index + 1}. #{name}: #{count} uses"
261
+ end
262
+ end
263
+
264
+ puts "\n✅ Statistics generation complete!"
265
+ end
266
+ end
267
+
268
+ # Run the generator if this script is executed directly
269
+ if __FILE__ == $0
270
+ puts "🚀 Starting Jekyll Site Statistics Generation..."
271
+ puts "📁 Working directory: #{Dir.pwd}"
272
+
273
+ generator = SiteStatisticsGenerator.new
274
+ generator.generate!
275
+ end
@@ -0,0 +1,15 @@
1
+ - title: Home
2
+ icon: bi-house
3
+ url: /home
4
+ sublinks:
5
+ - title: Style
6
+ url: /home/style/
7
+ - title: Map
8
+ icon: bi-map
9
+ url: /sitemap/
10
+ sublinks:
11
+ - title: Search
12
+ url: /search/
13
+ - title: Roadmap
14
+ url: /roadmap/
15
+
@@ -14,14 +14,11 @@
14
14
  sublinks:
15
15
  - title: All Posts
16
16
  url: /posts/
17
- - title: Stats
18
- url: /stats/
19
17
  - title: Docs
20
18
  url: /docs/
21
19
  sublinks:
22
20
  - title: Jekyll
23
21
  url: /docs/jekyll/
24
-
25
22
  - title: About
26
23
  url: /about/
27
24
  sublinks:
@@ -29,5 +26,5 @@
29
26
  url: /about/config/
30
27
  - title: Theme
31
28
  url: /about/theme/
32
- - title: Sitemap
33
- url: /about/sitemap/
29
+ - title: Site Map
30
+ url: /sitemap/