jekyll-theme-zer0 0.10.6 β†’ 0.15.2

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +428 -0
  3. data/README.md +79 -31
  4. data/_data/README.md +419 -17
  5. data/_data/generate_statistics.rb +216 -9
  6. data/_data/generate_statistics.sh +106 -0
  7. data/_data/github-actions-example.yml +210 -0
  8. data/_data/navigation/about.yml +39 -11
  9. data/_data/navigation/docs.yml +53 -23
  10. data/_data/navigation/home.yml +27 -9
  11. data/_data/navigation/main.yml +27 -8
  12. data/_data/navigation/posts.yml +22 -6
  13. data/_data/navigation/quickstart.yml +19 -6
  14. data/_data/posts_organization.yml +153 -0
  15. data/_data/prerequisites.yml +112 -0
  16. data/_data/statistics_config.yml +203 -0
  17. data/_data/ui-text.yml +321 -0
  18. data/_data/update_statistics.sh +126 -0
  19. data/_includes/README.md +2 -0
  20. data/_includes/components/js-cdn.html +4 -1
  21. data/_includes/components/post-card.html +2 -11
  22. data/_includes/components/preview-image.html +32 -0
  23. data/_includes/content/intro.html +9 -10
  24. data/_includes/core/header.html +14 -0
  25. data/_includes/navigation/sidebar-categories.html +20 -9
  26. data/_includes/navigation/sidebar-folders.html +8 -7
  27. data/_includes/navigation/sidebar-right.html +16 -10
  28. data/_layouts/blog.html +15 -45
  29. data/_layouts/category.html +4 -24
  30. data/_layouts/collection.html +2 -12
  31. data/_layouts/default.html +1 -1
  32. data/_layouts/journals.html +2 -12
  33. data/_layouts/notebook.html +296 -0
  34. data/_sass/core/_docs.scss +1 -1
  35. data/_sass/custom.scss +54 -17
  36. data/_sass/notebooks.scss +458 -0
  37. data/assets/images/notebooks/test-notebook_files/test-notebook_4_0.png +0 -0
  38. data/assets/js/sidebar.js +511 -0
  39. data/scripts/README.md +131 -105
  40. data/scripts/analyze-commits.sh +9 -311
  41. data/scripts/bin/build +22 -22
  42. data/scripts/build +7 -111
  43. data/scripts/convert-notebooks.sh +415 -0
  44. data/scripts/features/validate_preview_urls.py +500 -0
  45. data/scripts/fix-markdown-format.sh +8 -262
  46. data/scripts/generate-preview-images.sh +7 -787
  47. data/scripts/install-preview-generator.sh +8 -528
  48. data/scripts/lib/README.md +5 -5
  49. data/scripts/lib/changelog.sh +89 -57
  50. data/scripts/lib/gem.sh +19 -7
  51. data/scripts/release +7 -236
  52. data/scripts/setup.sh +9 -153
  53. data/scripts/test/lib/run_tests.sh +1 -2
  54. data/scripts/test-auto-version.sh +7 -256
  55. data/scripts/test-mermaid.sh +7 -287
  56. data/scripts/test.sh +9 -154
  57. metadata +16 -10
  58. data/scripts/features/preview_generator.py +0 -646
  59. data/scripts/lib/test/run_tests.sh +0 -140
  60. data/scripts/lib/test/test_changelog.sh +0 -87
  61. data/scripts/lib/test/test_gem.sh +0 -68
  62. data/scripts/lib/test/test_git.sh +0 -82
  63. data/scripts/lib/test/test_validation.sh +0 -72
  64. data/scripts/lib/test/test_version.sh +0 -96
  65. data/scripts/version.sh +0 -178
data/_data/README.md CHANGED
@@ -1,31 +1,433 @@
1
- ## Getting Started
1
+ # πŸ“Š Zer0-Mistakes Data Directory
2
2
 
3
- These instructions will help you understand the data files in this directory.
3
+ This directory contains YAML data files that power the Zer0-Mistakes Jekyll theme's dynamic features, including navigation, content statistics, internationalization, and content organization.
4
4
 
5
- ### Raw Data
5
+ ## πŸ“ Directory Contents
6
6
 
7
- The `raw` directory contains the raw data files. These files are the original data and have not been processed or manipulated in any way.
7
+ | File | Purpose | Auto-Generated |
8
+ |------|---------|----------------|
9
+ | `navigation/` | Site navigation menus | No |
10
+ | `authors.yml` | Author profile information | No |
11
+ | `content_statistics.yml` | Site content analytics | **Yes** |
12
+ | `statistics_config.yml` | Statistics generation config | No |
13
+ | `ui-text.yml` | Multilingual UI text labels | No |
14
+ | `prerequisites.yml` | Educational prerequisites | No |
15
+ | `posts_organization.yml` | Post section mappings | No |
16
+ | `generate_statistics.rb` | Statistics generator script | No |
17
+ | `generate_statistics.sh` | Bash wrapper script | No |
18
+ | `update_statistics.sh` | CI/CD automation script | No |
19
+ | `github-actions-example.yml` | Example workflow | No |
8
20
 
9
- ### Processed Data
21
+ ---
10
22
 
11
- The `processed` directory contains the data files that have been processed and are ready for analysis. These files have been cleaned, manipulated, or otherwise processed from the raw data files.
23
+ ## πŸ“‚ Navigation
12
24
 
13
- ## Contributing
25
+ ### `navigation/`
14
26
 
15
- Please read [CONTRIBUTING.md](url) for details on our code of conduct, and the process for submitting pull requests to us.
27
+ Contains YAML files for site navigation menus (sidebar, header, footer).
16
28
 
17
- ## Authors
29
+ **Example structure:**
30
+ ```yaml
31
+ # navigation/main.yml
32
+ - title: Home
33
+ url: /
34
+ icon: bi-house
35
+ - title: Documentation
36
+ url: /docs/
37
+ icon: bi-book
38
+ children:
39
+ - title: Getting Started
40
+ url: /docs/getting-started/
41
+ ```
18
42
 
19
- - **Your Name** - _Initial work_ - [YourGithub](url)
43
+ ---
20
44
 
21
- See also the list of [contributors](url) who participated in this project.
45
+ ## πŸ‘€ Authors
22
46
 
23
- ## License
47
+ ### `authors.yml`
24
48
 
25
- This project is licensed under the MIT License - see the [LICENSE.md](url) file for details
49
+ Defines author profiles for multi-author sites.
26
50
 
27
- ## Acknowledgments
51
+ **Structure:**
52
+ ```yaml
53
+ john_doe:
54
+ name: "John Doe"
55
+ bio: "Senior Developer and Technical Writer"
56
+ avatar: /assets/images/authors/john.jpg
57
+ email: john@example.com
58
+ twitter: johndoe
59
+ github: johndoe
60
+ website: https://johndoe.dev
61
+ ```
28
62
 
29
- - Hat tip to anyone whose code was used
30
- - Inspiration
31
- - etc
63
+ **Usage in posts:**
64
+ ```yaml
65
+ ---
66
+ author: john_doe
67
+ ---
68
+ ```
69
+
70
+ ---
71
+
72
+ ## πŸ“ˆ Content Statistics
73
+
74
+ ### `content_statistics.yml` ⚑ *Auto-Generated*
75
+
76
+ Contains computed statistics about site content. **Do not edit manually** - this file is regenerated by `generate_statistics.rb`.
77
+
78
+ **Generated metrics:**
79
+ - `total_posts`: Total number of posts
80
+ - `published`: Published posts count
81
+ - `drafts`: Draft posts count
82
+ - `categories`: Posts per category
83
+ - `category_count`: Total unique categories
84
+ - `tags`: Posts per tag
85
+ - `tag_count`: Total unique tags
86
+ - `focus_areas`: Content by focus area (DevOps, Frontend, etc.)
87
+ - `skill_levels`: Content by difficulty level
88
+ - `content_types`: Content by type (tutorial, guide, etc.)
89
+ - `authors`: Posts per author
90
+ - `content_freshness`: Age distribution of content
91
+ - `date_range`: Earliest and latest post dates
92
+ - `derived_stats`: Calculated averages and insights
93
+ - `generated_at`: Timestamp of generation
94
+
95
+ **Accessing in templates:**
96
+ ```liquid
97
+ {% assign stats = site.data.content_statistics %}
98
+ <p>Total posts: {{ stats.total_posts }}</p>
99
+ <p>Most posts in: {{ stats.derived_stats.most_common_category }}</p>
100
+ ```
101
+
102
+ ### `statistics_config.yml`
103
+
104
+ Configuration for the statistics generator. Defines keyword mappings for content analysis.
105
+
106
+ **Sections:**
107
+ ```yaml
108
+ # Focus area detection keywords
109
+ focus_areas:
110
+ devops: [docker, kubernetes, ci/cd, jenkins, terraform]
111
+ frontend: [javascript, react, vue, css, html]
112
+ backend: [python, node, api, database, sql]
113
+ # ... more areas
114
+
115
+ # Skill level detection
116
+ skill_levels:
117
+ beginner: [introduction, basics, getting started, 101]
118
+ intermediate: [advanced basics, building, implementing]
119
+ advanced: [optimization, architecture, scaling]
120
+ expert: [mastering, deep dive, internals]
121
+
122
+ # Content type detection
123
+ content_types:
124
+ tutorial: [tutorial, how-to, step-by-step, walkthrough]
125
+ guide: [guide, handbook, manual, reference]
126
+ # ... more types
127
+
128
+ # Display preferences
129
+ display:
130
+ top_categories: 10
131
+ top_tags: 20
132
+ top_focus_areas: 8
133
+ ```
134
+
135
+ ---
136
+
137
+ ## πŸ”§ Statistics Scripts
138
+
139
+ ### `generate_statistics.rb`
140
+
141
+ Ruby script that analyzes site content and generates `content_statistics.yml`.
142
+
143
+ **Usage:**
144
+ ```bash
145
+ # Direct execution
146
+ ruby _data/generate_statistics.rb
147
+
148
+ # Via wrapper script
149
+ bash _data/generate_statistics.sh
150
+ ```
151
+
152
+ **Features:**
153
+ - Front matter parsing
154
+ - Category and tag analysis
155
+ - Focus area detection (via keywords)
156
+ - Skill level classification
157
+ - Content freshness calculation
158
+ - Author statistics
159
+ - Derived metrics computation
160
+
161
+ ### `generate_statistics.sh`
162
+
163
+ Bash wrapper script for statistics generation with validation and preview.
164
+
165
+ **Usage:**
166
+ ```bash
167
+ # Generate statistics
168
+ ./generate_statistics.sh
169
+
170
+ # Preview output (requires yq)
171
+ ./generate_statistics.sh --preview
172
+ ```
173
+
174
+ **Features:**
175
+ - Ruby availability check
176
+ - Configuration file validation
177
+ - Content directory verification
178
+ - Color-coded output
179
+ - Optional preview with yq
180
+
181
+ ### `update_statistics.sh`
182
+
183
+ CI/CD automation script for running statistics updates in pipelines.
184
+
185
+ **Environment Variables:**
186
+ ```bash
187
+ CI=true # Indicates CI environment
188
+ AUTO_PUSH=true # Auto-commit and push changes
189
+ FORCE_UPDATE=true # Skip hash comparison
190
+ ```
191
+
192
+ **Features:**
193
+ - CI environment detection
194
+ - Hash-based change detection
195
+ - Automatic git commit/push
196
+ - Skip unchanged content
197
+ - Detailed logging
198
+
199
+ ### `github-actions-example.yml`
200
+
201
+ Example GitHub Actions workflow for automated statistics updates.
202
+
203
+ **Copy to `.github/workflows/update-statistics.yml` to enable.**
204
+
205
+ **Triggers:**
206
+ - Push to `pages/_posts/**`, `pages/_docs/**`, `_data/statistics_config.yml`
207
+ - Manual workflow_dispatch with options
208
+ - Weekly schedule (Monday 6 AM UTC)
209
+
210
+ **Workflow Options:**
211
+ - `force_update`: Update even if no changes detected
212
+ - `skip_push`: Generate but don't commit
213
+
214
+ ---
215
+
216
+ ## 🌐 Internationalization (i18n)
217
+
218
+ ### `ui-text.yml`
219
+
220
+ Multilingual UI text labels for theme components.
221
+
222
+ **Supported Languages:**
223
+ - `en` - English (default)
224
+ - `es` - Spanish
225
+ - `fr` - French
226
+ - `de` - German
227
+ - `ar` - Arabic (RTL)
228
+
229
+ **Structure:**
230
+ ```yaml
231
+ en:
232
+ # Navigation
233
+ skip_links: "Skip to main content"
234
+ menu_label: "Menu"
235
+ search_label: "Search"
236
+
237
+ # Content
238
+ read_more: "Read more"
239
+ table_of_contents: "Table of Contents"
240
+
241
+ # Statistics
242
+ stats_total_posts: "Total Posts"
243
+ stats_published: "Published"
244
+ # ... more labels
245
+ ```
246
+
247
+ **Usage in templates:**
248
+ ```liquid
249
+ {% assign ui = site.data.ui-text[site.lang | default: 'en'] %}
250
+ <span>{{ ui.read_more }}</span>
251
+ ```
252
+
253
+ ---
254
+
255
+ ## πŸ“š Educational Content
256
+
257
+ ### `prerequisites.yml`
258
+
259
+ Defines prerequisites for tutorials and educational content.
260
+
261
+ **Structure:**
262
+ ```yaml
263
+ - id: git-basics
264
+ title: "Git Version Control Basics"
265
+ description: "Understanding commits, branches, and basic git workflow"
266
+ level: beginner
267
+ category: version-control
268
+
269
+ - id: docker-fundamentals
270
+ title: "Docker Container Fundamentals"
271
+ description: "Understanding containers, images, and Docker CLI"
272
+ level: intermediate
273
+ category: devops
274
+ ```
275
+
276
+ **Usage in post front matter:**
277
+ ```yaml
278
+ ---
279
+ prerequisites:
280
+ - git-basics
281
+ - docker-fundamentals
282
+ ---
283
+ ```
284
+
285
+ **Usage in templates:**
286
+ ```liquid
287
+ {% if page.prerequisites %}
288
+ <div class="prerequisites">
289
+ <h4>Prerequisites</h4>
290
+ <ul>
291
+ {% for prereq_id in page.prerequisites %}
292
+ {% assign prereq = site.data.prerequisites | where: "id", prereq_id | first %}
293
+ <li>{{ prereq.title }} - {{ prereq.description }}</li>
294
+ {% endfor %}
295
+ </ul>
296
+ </div>
297
+ {% endif %}
298
+ ```
299
+
300
+ ---
301
+
302
+ ## πŸ“‚ Post Organization
303
+
304
+ ### `posts_organization.yml`
305
+
306
+ Configuration for post section mappings and URL patterns.
307
+
308
+ **Sections:**
309
+ ```yaml
310
+ sections:
311
+ - id: ai-machine-learning
312
+ title: "AI & Machine Learning"
313
+ directory: "pages/_posts/ai & machine learning"
314
+ icon: "bi-robot"
315
+ color: "#8B5CF6"
316
+ description: "Artificial intelligence, ML models, and data science"
317
+ aliases: ["ai", "ml", "machine-learning", "artificial-intelligence"]
318
+ ```
319
+
320
+ **Category to Section Mapping:**
321
+ ```yaml
322
+ category_to_section:
323
+ "ai & machine learning": ai-machine-learning
324
+ "artificial intelligence": ai-machine-learning
325
+ "devops": devops
326
+ "docker": devops
327
+ ```
328
+
329
+ **URL Pattern:**
330
+ ```yaml
331
+ url_pattern: "/:categories/:year/:month/:day/:title/"
332
+ ```
333
+
334
+ ---
335
+
336
+ ## πŸ”„ Automation Workflows
337
+
338
+ ### Setting Up Automated Statistics
339
+
340
+ 1. **Copy the workflow file:**
341
+ ```bash
342
+ cp _data/github-actions-example.yml .github/workflows/update-statistics.yml
343
+ ```
344
+
345
+ 2. **Ensure scripts are executable:**
346
+ ```bash
347
+ chmod +x _data/generate_statistics.sh
348
+ chmod +x _data/update_statistics.sh
349
+ ```
350
+
351
+ 3. **Customize triggers** in the workflow file as needed.
352
+
353
+ 4. **Push to main branch** to enable the workflow.
354
+
355
+ ### Manual Statistics Update
356
+
357
+ ```bash
358
+ # From repository root
359
+ cd _data
360
+ ruby generate_statistics.rb
361
+
362
+ # Or using the wrapper
363
+ bash generate_statistics.sh
364
+ ```
365
+
366
+ ---
367
+
368
+ ## πŸ› οΈ Customization
369
+
370
+ ### Adding New Focus Areas
371
+
372
+ Edit `statistics_config.yml`:
373
+ ```yaml
374
+ focus_areas:
375
+ my_new_area:
376
+ - keyword1
377
+ - keyword2
378
+ - keyword3
379
+ ```
380
+
381
+ ### Adding New Languages
382
+
383
+ Add a new language block to `ui-text.yml`:
384
+ ```yaml
385
+ ja: # Japanese
386
+ skip_links: "パむンコンテンツへスキップ"
387
+ menu_label: "パニγƒ₯γƒΌ"
388
+ # ... translate all labels
389
+ ```
390
+
391
+ ### Adding New Prerequisites
392
+
393
+ Edit `prerequisites.yml`:
394
+ ```yaml
395
+ - id: my-prerequisite
396
+ title: "My New Prerequisite"
397
+ description: "Description of what this covers"
398
+ level: beginner # beginner|intermediate|advanced|expert
399
+ category: my-category
400
+ ```
401
+
402
+ ---
403
+
404
+ ## πŸ“‹ Best Practices
405
+
406
+ 1. **Never edit `content_statistics.yml` manually** - it will be overwritten
407
+ 2. **Keep `statistics_config.yml` updated** when adding new content types
408
+ 3. **Test configuration changes locally** before pushing
409
+ 4. **Use consistent language codes** in `ui-text.yml`
410
+ 5. **Keep prerequisite IDs kebab-case** for URL friendliness
411
+ 6. **Validate YAML syntax** before committing:
412
+ ```bash
413
+ ruby -ryaml -e "YAML.load_file('_data/your-file.yml')"
414
+ ```
415
+
416
+ ---
417
+
418
+ ## 🀝 Contributing
419
+
420
+ When modifying data files:
421
+
422
+ 1. Follow existing YAML formatting conventions
423
+ 2. Test changes locally with `bundle exec jekyll serve`
424
+ 3. Run statistics generation to verify no errors
425
+ 4. Update this README if adding new files or features
426
+
427
+ See [CONTRIBUTING.md](../CONTRIBUTING.md) for full guidelines.
428
+
429
+ ---
430
+
431
+ ## πŸ“„ License
432
+
433
+ This project is licensed under the MIT License - see the [LICENSE](../LICENSE) file for details.