jekyll-theme-zer0 0.22.0 → 0.22.19

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +236 -0
  3. data/README.md +66 -19
  4. data/_data/navigation/admin.yml +53 -0
  5. data/_data/theme_backgrounds.yml +121 -0
  6. data/_includes/components/admin-tabs.html +59 -0
  7. data/_includes/components/analytics-dashboard.html +232 -0
  8. data/_includes/components/background-customizer.html +159 -0
  9. data/_includes/components/background-settings.html +137 -0
  10. data/_includes/components/collection-manager.html +151 -0
  11. data/_includes/components/component-showcase.html +452 -0
  12. data/_includes/components/config-editor.html +207 -0
  13. data/_includes/components/config-viewer.html +479 -0
  14. data/_includes/components/env-dashboard.html +154 -0
  15. data/_includes/components/feature-card.html +94 -0
  16. data/_includes/components/info-section.html +172 -149
  17. data/_includes/components/js-cdn.html +4 -1
  18. data/_includes/components/nav-editor.html +99 -0
  19. data/_includes/components/setup-banner.html +28 -0
  20. data/_includes/components/setup-check.html +53 -0
  21. data/_includes/components/svg-background.html +42 -0
  22. data/_includes/components/theme-customizer.html +46 -0
  23. data/_includes/content/seo.html +68 -135
  24. data/_includes/core/footer.html +1 -1
  25. data/_includes/core/head.html +3 -2
  26. data/_includes/core/header.html +14 -7
  27. data/_includes/landing/landing-install-cards.html +18 -7
  28. data/_includes/navigation/admin-nav.html +95 -0
  29. data/_includes/navigation/navbar.html +43 -5
  30. data/_includes/navigation/sidebar-left.html +1 -1
  31. data/_includes/setup/wizard.html +330 -0
  32. data/_layouts/admin.html +166 -0
  33. data/_layouts/landing.html +23 -9
  34. data/_layouts/root.html +12 -6
  35. data/_layouts/setup.html +73 -0
  36. data/_plugins/preview_image_generator.rb +26 -12
  37. data/_sass/core/_navbar.scss +2 -2
  38. data/_sass/custom.scss +28 -6
  39. data/_sass/theme/_background-mixins.scss +95 -0
  40. data/_sass/theme/_backgrounds.scss +156 -0
  41. data/_sass/theme/_color-modes.scss +2 -1
  42. data/assets/backgrounds/gradients/air.svg +15 -0
  43. data/assets/backgrounds/gradients/aqua.svg +15 -0
  44. data/assets/backgrounds/gradients/contrast.svg +15 -0
  45. data/assets/backgrounds/gradients/dark.svg +15 -0
  46. data/assets/backgrounds/gradients/dirt.svg +15 -0
  47. data/assets/backgrounds/gradients/mint.svg +15 -0
  48. data/assets/backgrounds/gradients/neon.svg +15 -0
  49. data/assets/backgrounds/gradients/plum.svg +15 -0
  50. data/assets/backgrounds/gradients/sunrise.svg +15 -0
  51. data/assets/backgrounds/noise/air.svg +8 -0
  52. data/assets/backgrounds/noise/aqua.svg +8 -0
  53. data/assets/backgrounds/noise/contrast.svg +8 -0
  54. data/assets/backgrounds/noise/dark.svg +8 -0
  55. data/assets/backgrounds/noise/dirt.svg +8 -0
  56. data/assets/backgrounds/noise/mint.svg +8 -0
  57. data/assets/backgrounds/noise/neon.svg +8 -0
  58. data/assets/backgrounds/noise/plum.svg +8 -0
  59. data/assets/backgrounds/noise/sunrise.svg +8 -0
  60. data/assets/backgrounds/patterns/air.svg +7 -0
  61. data/assets/backgrounds/patterns/aqua.svg +7 -0
  62. data/assets/backgrounds/patterns/contrast.svg +4 -0
  63. data/assets/backgrounds/patterns/dark.svg +5 -0
  64. data/assets/backgrounds/patterns/dirt.svg +5 -0
  65. data/assets/backgrounds/patterns/mint.svg +6 -0
  66. data/assets/backgrounds/patterns/neon.svg +6 -0
  67. data/assets/backgrounds/patterns/plum.svg +6 -0
  68. data/assets/backgrounds/patterns/sunrise.svg +5 -0
  69. data/assets/js/background-customizer.js +73 -0
  70. data/assets/js/code-copy.js +18 -47
  71. data/assets/js/config-utility.js +307 -0
  72. data/assets/js/nav-editor.js +39 -0
  73. data/assets/js/palette-generator.js +415 -0
  74. data/assets/js/search-modal.js +31 -11
  75. data/assets/js/setup-wizard.js +306 -0
  76. data/assets/js/skin-editor.js +645 -0
  77. data/assets/js/theme-customizer.js +102 -0
  78. data/assets/js/ui-enhancements.js +15 -24
  79. data/assets/vendor/bootstrap/css/bootstrap.min.css +1 -0
  80. data/assets/vendor/bootstrap/js/bootstrap.bundle.min.js +1 -0
  81. data/scripts/README.md +45 -0
  82. data/scripts/features/generate-preview-images +297 -7
  83. data/scripts/features/install-preview-generator +51 -33
  84. data/scripts/fork-cleanup.sh +92 -19
  85. data/scripts/github-setup.sh +284 -0
  86. data/scripts/init_setup.sh +0 -1
  87. data/scripts/lib/frontmatter.sh +543 -0
  88. data/scripts/lib/migrate.sh +265 -0
  89. data/scripts/lib/preview_generator.py +607 -32
  90. data/scripts/lint-pages +505 -0
  91. data/scripts/migrate.sh +201 -0
  92. data/scripts/platform/setup-linux.sh +244 -0
  93. data/scripts/platform/setup-macos.sh +187 -0
  94. data/scripts/platform/setup-wsl.sh +196 -0
  95. metadata +71 -6
@@ -0,0 +1,196 @@
1
+ #!/bin/bash
2
+ # =========================================================================
3
+ # Zer0-Mistakes Platform Setup: Windows (WSL)
4
+ # =========================================================================
5
+ # Detects WSL version, validates Docker Desktop integration, and provides
6
+ # guidance for Windows users who are NOT yet in WSL.
7
+ #
8
+ # Usage: source scripts/platform/setup-wsl.sh
9
+ # setup_wsl [--install-missing]
10
+ # =========================================================================
11
+
12
+ # Only enable strict mode when executed directly (not sourced), so we don't
13
+ # mutate the caller's shell options.
14
+ if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
15
+ set -euo pipefail
16
+ fi
17
+
18
+ # ── Fallback logging helpers (used when not sourced from install.sh) ─────
19
+ if ! declare -F log_info >/dev/null 2>&1; then
20
+ log_info() { echo "[INFO] $*"; }
21
+ log_success() { echo "[SUCCESS] $*"; }
22
+ log_warning() { echo "[WARNING] $*"; }
23
+ log_error() { echo "[ERROR] $*" >&2; }
24
+ fi
25
+
26
+ # -------------------------------------------------------------------------
27
+ # WSL detection helpers
28
+ # -------------------------------------------------------------------------
29
+ is_wsl() {
30
+ [[ -f /proc/version ]] && grep -qi 'microsoft\|wsl' /proc/version 2>/dev/null
31
+ }
32
+
33
+ detect_wsl_version() {
34
+ if [[ -f /proc/version ]]; then
35
+ if grep -qi 'WSL2' /proc/version 2>/dev/null; then
36
+ echo "2"
37
+ elif grep -qi 'microsoft\|wsl' /proc/version 2>/dev/null; then
38
+ echo "1"
39
+ else
40
+ echo "0"
41
+ fi
42
+ else
43
+ echo "0"
44
+ fi
45
+ }
46
+
47
+ detect_wsl_distro() {
48
+ if [[ -f /etc/os-release ]]; then
49
+ # shellcheck source=/dev/null
50
+ source /etc/os-release
51
+ echo "${PRETTY_NAME:-WSL Linux}"
52
+ else
53
+ echo "WSL Linux"
54
+ fi
55
+ }
56
+
57
+ # -------------------------------------------------------------------------
58
+ # Check Docker Desktop integration
59
+ # -------------------------------------------------------------------------
60
+ check_docker_wsl() {
61
+ # In WSL, Docker Desktop provides a docker CLI via integration
62
+ if command -v docker &>/dev/null && docker info &>/dev/null 2>&1; then
63
+ return 0
64
+ fi
65
+ return 1
66
+ }
67
+
68
+ check_docker_desktop_integration() {
69
+ # Docker Desktop creates this socket when WSL integration is enabled
70
+ [[ -S /var/run/docker.sock ]] || [[ -S "$HOME/.docker/run/docker.sock" ]]
71
+ }
72
+
73
+ # -------------------------------------------------------------------------
74
+ # Provide Windows setup guidance (for users not yet in WSL)
75
+ # -------------------------------------------------------------------------
76
+ print_windows_native_guide() {
77
+ echo
78
+ log_error "This script must be run inside WSL (Windows Subsystem for Linux)."
79
+ echo
80
+ echo "======================================================================"
81
+ echo " WINDOWS SETUP GUIDE — 3 Steps to Get Running"
82
+ echo "======================================================================"
83
+ echo
84
+ echo " Step 1: Install WSL 2 (open PowerShell as Administrator):"
85
+ echo
86
+ echo " wsl --install"
87
+ echo
88
+ echo " Step 2: Install Docker Desktop for Windows:"
89
+ echo
90
+ echo " https://www.docker.com/products/docker-desktop"
91
+ echo
92
+ echo " In Docker Desktop Settings → Resources → WSL Integration:"
93
+ echo " ✅ Enable integration with your WSL 2 distro"
94
+ echo
95
+ echo " Step 3: Open your WSL terminal and run the installer:"
96
+ echo
97
+ echo " mkdir my-site && cd my-site"
98
+ echo " curl -fsSL https://raw.githubusercontent.com/bamr87/zer0-mistakes/main/install.sh | bash"
99
+ echo
100
+ echo "======================================================================"
101
+ echo
102
+ echo " Detailed guide: https://learn.microsoft.com/en-us/windows/wsl/install"
103
+ echo
104
+ }
105
+
106
+ # -------------------------------------------------------------------------
107
+ # Main setup function
108
+ # -------------------------------------------------------------------------
109
+ setup_wsl() {
110
+ local install_missing="${1:-false}"
111
+ local wsl_ver
112
+ wsl_ver="$(detect_wsl_version)"
113
+ local wsl_distro
114
+ wsl_distro="$(detect_wsl_distro)"
115
+ local all_ok=true
116
+
117
+ log_info "WSL detected: ${wsl_distro} (WSL ${wsl_ver})"
118
+ echo
119
+
120
+ # --- WSL version check ---
121
+ if [[ "$wsl_ver" == "2" ]]; then
122
+ log_success "WSL 2: required for Docker Desktop integration"
123
+ elif [[ "$wsl_ver" == "1" ]]; then
124
+ log_error "WSL 1 detected — Docker Desktop requires WSL 2."
125
+ echo
126
+ log_info "Upgrade to WSL 2 (run from Windows PowerShell / Command Prompt):"
127
+ echo " 1. wsl.exe -l -v # list distros and their WSL versions"
128
+ echo " 2. wsl.exe --set-version <DistroName> 2 # upgrade a specific distro"
129
+ echo " 3. wsl.exe --set-default-version 2 # make WSL 2 the default for new distros"
130
+ echo
131
+ return 1
132
+ fi
133
+
134
+ # --- Git ---
135
+ if command -v git &>/dev/null; then
136
+ log_success "Git: $(git --version)"
137
+ else
138
+ log_warning "Git: not installed"
139
+ if [[ "$install_missing" == "--install-missing" ]]; then
140
+ sudo apt-get update -qq && sudo apt-get install -y -qq git
141
+ else
142
+ log_info " Install: sudo apt-get install git"
143
+ all_ok=false
144
+ fi
145
+ fi
146
+
147
+ # --- Docker (via Docker Desktop integration) ---
148
+ if check_docker_wsl; then
149
+ log_success "Docker: $(docker --version) (via Docker Desktop)"
150
+ elif check_docker_desktop_integration; then
151
+ log_warning "Docker socket found but daemon not responding."
152
+ log_info " Make sure Docker Desktop is running on Windows."
153
+ all_ok=false
154
+ else
155
+ log_warning "Docker: not available in this WSL session"
156
+ echo
157
+ log_info "Docker Desktop WSL 2 integration setup:"
158
+ echo " 1. Install Docker Desktop for Windows"
159
+ echo " https://www.docker.com/products/docker-desktop"
160
+ echo " 2. Open Docker Desktop → Settings → Resources → WSL Integration"
161
+ echo " 3. Enable integration with your distro (${wsl_distro})"
162
+ echo " 4. Restart this WSL terminal"
163
+ echo
164
+ all_ok=false
165
+ fi
166
+
167
+ # --- Line ending configuration ---
168
+ if command -v git &>/dev/null; then
169
+ local autocrlf
170
+ autocrlf="$(git config --global core.autocrlf 2>/dev/null || echo "")"
171
+ if [[ "$autocrlf" == "input" ]]; then
172
+ log_success "Git line endings: core.autocrlf=input (correct for WSL)"
173
+ else
174
+ log_warning "Git line endings: core.autocrlf=${autocrlf:-unset}"
175
+ log_info " Recommended: git config --global core.autocrlf input"
176
+ if [[ "$install_missing" == "--install-missing" ]]; then
177
+ git config --global core.autocrlf input
178
+ log_success "Set core.autocrlf=input"
179
+ fi
180
+ fi
181
+ fi
182
+
183
+ echo
184
+ if [[ "$all_ok" == true ]]; then
185
+ log_success "All WSL prerequisites satisfied."
186
+ return 0
187
+ else
188
+ log_warning "Some prerequisites are missing. See guidance above."
189
+ return 1
190
+ fi
191
+ }
192
+
193
+ # ── Entrypoint (when executed directly, not sourced) ─────────────────────
194
+ if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
195
+ setup_wsl "$@"
196
+ fi
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-zer0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.22.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-02 00:00:00.000000000 Z
11
+ date: 2026-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -87,6 +87,7 @@ files:
87
87
  - _data/glossary.yml
88
88
  - _data/navigation/README.md
89
89
  - _data/navigation/about.yml
90
+ - _data/navigation/admin.yml
90
91
  - _data/navigation/docs.yml
91
92
  - _data/navigation/home.yml
92
93
  - _data/navigation/main.yml
@@ -96,6 +97,7 @@ files:
96
97
  - _data/prerequisites.yml
97
98
  - _data/prompts.yml
98
99
  - _data/statistics_config.yml
100
+ - _data/theme_backgrounds.yml
99
101
  - _data/ui-text.yml
100
102
  - _data/update_statistics.sh
101
103
  - _includes/README.md
@@ -103,16 +105,27 @@ files:
103
105
  - _includes/analytics/google-tag-manager-body.html
104
106
  - _includes/analytics/google-tag-manager-head.html
105
107
  - _includes/analytics/posthog.html
108
+ - _includes/components/admin-tabs.html
109
+ - _includes/components/analytics-dashboard.html
106
110
  - _includes/components/author-card.html
107
111
  - _includes/components/author-eeat.html
112
+ - _includes/components/background-customizer.html
113
+ - _includes/components/background-settings.html
114
+ - _includes/components/collection-manager.html
115
+ - _includes/components/component-showcase.html
116
+ - _includes/components/config-editor.html
117
+ - _includes/components/config-viewer.html
108
118
  - _includes/components/cookie-consent.html
109
119
  - _includes/components/dev-shortcuts.html
120
+ - _includes/components/env-dashboard.html
110
121
  - _includes/components/env-detect.html
111
122
  - _includes/components/env-switcher.html
123
+ - _includes/components/feature-card.html
112
124
  - _includes/components/halfmoon.html
113
125
  - _includes/components/info-section.html
114
126
  - _includes/components/js-cdn.html
115
127
  - _includes/components/mermaid.html
128
+ - _includes/components/nav-editor.html
116
129
  - _includes/components/post-card.html
117
130
  - _includes/components/post-type-badge.html
118
131
  - _includes/components/powered-by.html
@@ -120,7 +133,11 @@ files:
120
133
  - _includes/components/quick-index.html
121
134
  - _includes/components/search-modal.html
122
135
  - _includes/components/searchbar.html
136
+ - _includes/components/setup-banner.html
137
+ - _includes/components/setup-check.html
138
+ - _includes/components/svg-background.html
123
139
  - _includes/components/svg.html
140
+ - _includes/components/theme-customizer.html
124
141
  - _includes/components/theme-info.html
125
142
  - _includes/components/zer0-env-var.html
126
143
  - _includes/content/giscus.html
@@ -137,6 +154,7 @@ files:
137
154
  - _includes/docs/bootstrap-docs.html
138
155
  - _includes/landing/landing-install-cards.html
139
156
  - _includes/landing/landing-quick-links.html
157
+ - _includes/navigation/admin-nav.html
140
158
  - _includes/navigation/breadcrumbs.html
141
159
  - _includes/navigation/nav-tree.html
142
160
  - _includes/navigation/nav_list.html
@@ -147,6 +165,7 @@ files:
147
165
  - _includes/navigation/sidebar-left.html
148
166
  - _includes/navigation/sidebar-right.html
149
167
  - _includes/search-data.json
168
+ - _includes/setup/wizard.html
150
169
  - _includes/stats/README.md
151
170
  - _includes/stats/stats-categories.html
152
171
  - _includes/stats/stats-header.html
@@ -155,6 +174,7 @@ files:
155
174
  - _includes/stats/stats-overview.html
156
175
  - _includes/stats/stats-tags.html
157
176
  - _layouts/README.md
177
+ - _layouts/admin.html
158
178
  - _layouts/article.html
159
179
  - _layouts/collection.html
160
180
  - _layouts/default.html
@@ -167,6 +187,7 @@ files:
167
187
  - _layouts/root.html
168
188
  - _layouts/search.html
169
189
  - _layouts/section.html
190
+ - _layouts/setup.html
170
191
  - _layouts/sitemap-collection.html
171
192
  - _layouts/stats.html
172
193
  - _layouts/tag.html
@@ -182,10 +203,39 @@ files:
182
203
  - _sass/core/code-copy.scss
183
204
  - _sass/custom.scss
184
205
  - _sass/notebooks.scss
206
+ - _sass/theme/_background-mixins.scss
207
+ - _sass/theme/_backgrounds.scss
185
208
  - _sass/theme/_color-modes.scss
186
209
  - _sass/theme/_css-variables.scss
187
210
  - _sass/theme/_wizard-mode.scss
188
211
  - assets/.DS_Store
212
+ - assets/backgrounds/gradients/air.svg
213
+ - assets/backgrounds/gradients/aqua.svg
214
+ - assets/backgrounds/gradients/contrast.svg
215
+ - assets/backgrounds/gradients/dark.svg
216
+ - assets/backgrounds/gradients/dirt.svg
217
+ - assets/backgrounds/gradients/mint.svg
218
+ - assets/backgrounds/gradients/neon.svg
219
+ - assets/backgrounds/gradients/plum.svg
220
+ - assets/backgrounds/gradients/sunrise.svg
221
+ - assets/backgrounds/noise/air.svg
222
+ - assets/backgrounds/noise/aqua.svg
223
+ - assets/backgrounds/noise/contrast.svg
224
+ - assets/backgrounds/noise/dark.svg
225
+ - assets/backgrounds/noise/dirt.svg
226
+ - assets/backgrounds/noise/mint.svg
227
+ - assets/backgrounds/noise/neon.svg
228
+ - assets/backgrounds/noise/plum.svg
229
+ - assets/backgrounds/noise/sunrise.svg
230
+ - assets/backgrounds/patterns/air.svg
231
+ - assets/backgrounds/patterns/aqua.svg
232
+ - assets/backgrounds/patterns/contrast.svg
233
+ - assets/backgrounds/patterns/dark.svg
234
+ - assets/backgrounds/patterns/dirt.svg
235
+ - assets/backgrounds/patterns/mint.svg
236
+ - assets/backgrounds/patterns/neon.svg
237
+ - assets/backgrounds/patterns/plum.svg
238
+ - assets/backgrounds/patterns/sunrise.svg
189
239
  - assets/css/custom.css
190
240
  - assets/css/main.scss
191
241
  - assets/css/stats.css
@@ -225,9 +275,11 @@ files:
225
275
  - assets/images/zer0-mistakes-wizard.png
226
276
  - assets/js/auto-hide-nav.js
227
277
  - assets/js/back-to-top.js
278
+ - assets/js/background-customizer.js
228
279
  - assets/js/cheetsheet.js
229
280
  - assets/js/code-copy.js
230
281
  - assets/js/color-modes.js
282
+ - assets/js/config-utility.js
231
283
  - assets/js/docs.min.js
232
284
  - assets/js/halfmoon.js
233
285
  - assets/js/modules/navigation/config.js
@@ -240,11 +292,16 @@ files:
240
292
  - assets/js/modules/navigation/smooth-scroll.js
241
293
  - assets/js/myScript.js
242
294
  - assets/js/nanobar.min.js
295
+ - assets/js/nav-editor.js
243
296
  - assets/js/navigation.js
297
+ - assets/js/palette-generator.js
244
298
  - assets/js/particles-source.js
245
299
  - assets/js/particles.js
246
300
  - assets/js/search-modal.js
301
+ - assets/js/setup-wizard.js
247
302
  - assets/js/side-bar-folders.js
303
+ - assets/js/skin-editor.js
304
+ - assets/js/theme-customizer.js
248
305
  - assets/js/ui-enhancements.js
249
306
  - assets/particles.json
250
307
  - assets/vendor/bootstrap-icons/font/bootstrap-icons.css
@@ -307,18 +364,26 @@ files:
307
364
  - scripts/fix-markdown-format.sh
308
365
  - scripts/fork-cleanup.sh
309
366
  - scripts/generate-preview-images.sh
367
+ - scripts/github-setup.sh
310
368
  - scripts/init_setup.sh
311
369
  - scripts/install-preview-generator.sh
312
370
  - scripts/lib/README.md
313
371
  - scripts/lib/changelog.sh
314
372
  - scripts/lib/common.sh
373
+ - scripts/lib/frontmatter.sh
315
374
  - scripts/lib/gem.sh
316
375
  - scripts/lib/git.sh
376
+ - scripts/lib/migrate.sh
317
377
  - scripts/lib/preview_generator.py
318
378
  - scripts/lib/template.sh
319
379
  - scripts/lib/validation.sh
320
380
  - scripts/lib/version.sh
381
+ - scripts/lint-pages
321
382
  - scripts/migrate-nav-modes.sh
383
+ - scripts/migrate.sh
384
+ - scripts/platform/setup-linux.sh
385
+ - scripts/platform/setup-macos.sh
386
+ - scripts/platform/setup-wsl.sh
322
387
  - scripts/post-template-setup.sh
323
388
  - scripts/release
324
389
  - scripts/setup.sh
@@ -350,7 +415,7 @@ metadata:
350
415
  changelog_uri: https://github.com/bamr87/zer0-mistakes/blob/main/CHANGELOG.md
351
416
  documentation_uri: https://github.com/bamr87/zer0-mistakes#readme
352
417
  allowed_push_host: https://rubygems.org
353
- post_install_message:
418
+ post_install_message:
354
419
  rdoc_options: []
355
420
  require_paths:
356
421
  - lib
@@ -365,8 +430,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
365
430
  - !ruby/object:Gem::Version
366
431
  version: '0'
367
432
  requirements: []
368
- rubygems_version: 3.0.3.1
369
- signing_key:
433
+ rubygems_version: 3.5.22
434
+ signing_key:
370
435
  specification_version: 4
371
436
  summary: Jekyll theme based on bootstrap and compatible with github pages
372
437
  test_files: []