jekyll-theme-zer0 0.8.1 โ†’ 0.10.3

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +308 -4
  3. data/README.md +58 -25
  4. data/_data/README.md +4 -5
  5. data/_includes/README.md +1 -1
  6. data/_includes/components/mermaid.html +98 -9
  7. data/_includes/content/intro.html +13 -1
  8. data/_includes/core/header.html +1 -1
  9. data/_includes/stats/README.md +14 -2
  10. data/_layouts/README.md +3 -3
  11. data/_layouts/category.html +16 -6
  12. data/_layouts/collection.html +8 -3
  13. data/_layouts/journals.html +8 -3
  14. data/_sass/core/_theme.scss +4 -1
  15. data/_sass/custom.scss +20 -12
  16. data/assets/images/previews/10-ai-tools-that-will-transform-your-productivity-.png +0 -0
  17. data/assets/images/previews/business.png +0 -0
  18. data/assets/images/previews/css-grid-mastery-build-any-layout-you-can-imagine.png +0 -0
  19. data/assets/images/previews/development.png +0 -0
  20. data/assets/images/previews/github-setup-deployment.png +0 -0
  21. data/assets/images/previews/jekyll-setup.png +0 -0
  22. data/assets/images/previews/machine-setup.png +0 -0
  23. data/assets/images/previews/published-documentation-library.png +0 -0
  24. data/assets/images/previews/quantum-computing-explained-from-qubits-to-quantum.png +0 -0
  25. data/assets/images/previews/science.png +0 -0
  26. data/assets/images/previews/technology.png +0 -0
  27. data/assets/images/previews/the-complete-guide-to-startup-funding-in-2025.png +0 -0
  28. data/assets/images/previews/the-remote-work-revolution-how-global-teams-are-re.png +0 -0
  29. data/assets/images/previews/tutorial.png +0 -0
  30. data/assets/images/previews/world-news.png +0 -0
  31. data/assets/images/previews/zer0-mistakes-news-network-building-dynamic-news-s.png +0 -0
  32. data/assets/images/previews/zer0-mistakes-quick-start-guide.png +0 -0
  33. data/assets/js/auto-hide-nav.js +79 -16
  34. data/scripts/bin/build +115 -0
  35. data/scripts/bin/release +240 -0
  36. data/scripts/bin/test +203 -0
  37. data/scripts/features/generate-preview-images +846 -0
  38. data/scripts/features/install-preview-generator +531 -0
  39. data/scripts/features/preview_generator.py +646 -0
  40. data/scripts/generate-preview-images.sh +38 -93
  41. data/scripts/lib/README.md +35 -7
  42. data/scripts/lib/preview_generator.py +37 -22
  43. data/scripts/test/integration/auto-version +243 -0
  44. data/scripts/test/integration/mermaid +252 -0
  45. data/scripts/test/lib/run_tests.sh +151 -0
  46. data/scripts/test/lib/test_changelog.sh +90 -0
  47. data/scripts/test/lib/test_gem.sh +71 -0
  48. data/scripts/test/lib/test_git.sh +85 -0
  49. data/scripts/test/lib/test_validation.sh +75 -0
  50. data/scripts/test/lib/test_version.sh +101 -0
  51. data/scripts/test/theme/validate +120 -0
  52. data/scripts/test-mermaid.sh +51 -11
  53. data/scripts/utils/analyze-commits +300 -0
  54. data/scripts/utils/fix-markdown +251 -0
  55. data/scripts/utils/setup +137 -0
  56. data/scripts/version.sh +26 -0
  57. metadata +37 -8
  58. data/scripts/build.sh +0 -33
  59. data/scripts/build.sh.legacy +0 -174
  60. data/scripts/gem-publish.sh +0 -42
  61. data/scripts/gem-publish.sh.legacy +0 -700
  62. data/scripts/release.sh +0 -33
  63. data/scripts/release.sh.legacy +0 -342
data/scripts/bin/test ADDED
@@ -0,0 +1,203 @@
1
+ #!/bin/bash
2
+
3
+ # Unified test runner for zer0-mistakes Jekyll theme
4
+ # Usage: ./scripts/bin/test [options]
5
+ #
6
+ # Runs all test suites: library tests, theme tests, and integration tests.
7
+
8
+ set -euo pipefail
9
+
10
+ # Get script and library directories
11
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12
+ SCRIPTS_ROOT="$SCRIPT_DIR/.."
13
+ LIB_DIR="$SCRIPTS_ROOT/lib"
14
+ TEST_DIR="$SCRIPTS_ROOT/test"
15
+
16
+ # Source common library for logging
17
+ source "$LIB_DIR/common.sh"
18
+
19
+ # Aliases for consistent function naming
20
+ log_info() { info "$@"; }
21
+ log_success() { success "$@"; }
22
+ log_warning() { warn "$@"; }
23
+ log_error() { echo -e "${RED}[ERROR]${NC} $@" >&2; }
24
+
25
+ # Show usage
26
+ show_usage() {
27
+ cat << EOF
28
+ ๐Ÿงช Unified Test Runner for zer0-mistakes
29
+
30
+ USAGE:
31
+ ./scripts/bin/test [OPTIONS] [TEST_SUITE]
32
+
33
+ TEST SUITES:
34
+ all Run all tests (default)
35
+ lib Run library unit tests only
36
+ theme Run theme validation tests only
37
+ integration Run integration tests only
38
+
39
+ OPTIONS:
40
+ --verbose, -v Show detailed test output
41
+ --dry-run Preview what tests would run
42
+ --help, -h Show this help message
43
+
44
+ EXAMPLES:
45
+ ./scripts/bin/test # Run all tests
46
+ ./scripts/bin/test lib # Run library tests only
47
+ ./scripts/bin/test --verbose # Run all tests with verbose output
48
+
49
+ TEST LOCATIONS:
50
+ Library tests: scripts/test/lib/
51
+ Theme tests: scripts/test/theme/
52
+ Integration tests: scripts/test/integration/
53
+ EOF
54
+ }
55
+
56
+ # Parse arguments
57
+ TEST_SUITE="all"
58
+ for arg in "$@"; do
59
+ case $arg in
60
+ --help|-h)
61
+ show_usage
62
+ exit 0
63
+ ;;
64
+ --verbose|-v)
65
+ export VERBOSE=true
66
+ ;;
67
+ --dry-run)
68
+ export DRY_RUN=true
69
+ ;;
70
+ all|lib|theme|integration)
71
+ TEST_SUITE="$arg"
72
+ ;;
73
+ *)
74
+ error "Unknown option: $arg (use --help for usage)"
75
+ ;;
76
+ esac
77
+ done
78
+
79
+ # Track test results
80
+ TOTAL_TESTS=0
81
+ TOTAL_PASSED=0
82
+ TOTAL_FAILED=0
83
+
84
+ # Run library tests
85
+ run_lib_tests() {
86
+ log_info "Running library unit tests..."
87
+
88
+ if [[ -f "$TEST_DIR/lib/run_tests.sh" ]]; then
89
+ # Use current bash interpreter to ensure bash 4+ features work
90
+ if "$BASH" "$TEST_DIR/lib/run_tests.sh"; then
91
+ log_success "Library tests passed"
92
+ ((TOTAL_PASSED++)) || true
93
+ else
94
+ log_error "Library tests failed"
95
+ ((TOTAL_FAILED++)) || true
96
+ fi
97
+ ((TOTAL_TESTS++)) || true
98
+ else
99
+ log_warning "Library test runner not found at $TEST_DIR/lib/run_tests.sh"
100
+ fi
101
+ }
102
+
103
+ # Run theme validation tests
104
+ run_theme_tests() {
105
+ log_info "Running theme validation tests..."
106
+
107
+ # Check for theme test script (will be migrated here)
108
+ if [[ -f "$TEST_DIR/theme/validate" ]]; then
109
+ if "$TEST_DIR/theme/validate"; then
110
+ log_success "Theme tests passed"
111
+ ((TOTAL_PASSED++)) || true
112
+ else
113
+ log_error "Theme tests failed"
114
+ ((TOTAL_FAILED++)) || true
115
+ fi
116
+ ((TOTAL_TESTS++)) || true
117
+ else
118
+ # Fall back to legacy test.sh in scripts root
119
+ if [[ -f "$SCRIPTS_ROOT/test.sh" ]]; then
120
+ log_warning "Using legacy test.sh (will be migrated to test/theme/)"
121
+ if "$SCRIPTS_ROOT/test.sh"; then
122
+ log_success "Theme tests passed"
123
+ ((TOTAL_PASSED++)) || true
124
+ else
125
+ log_error "Theme tests failed"
126
+ ((TOTAL_FAILED++)) || true
127
+ fi
128
+ ((TOTAL_TESTS++)) || true
129
+ else
130
+ log_warning "Theme tests not found"
131
+ fi
132
+ fi
133
+ }
134
+
135
+ # Run integration tests
136
+ run_integration_tests() {
137
+ log_info "Running integration tests..."
138
+
139
+ local found_tests=false
140
+
141
+ for test_file in "$TEST_DIR/integration"/*; do
142
+ if [[ -f "$test_file" && -x "$test_file" ]]; then
143
+ found_tests=true
144
+ local test_name
145
+ test_name=$(basename "$test_file")
146
+ log_info "Running integration test: $test_name"
147
+
148
+ if "$test_file"; then
149
+ log_success "$test_name passed"
150
+ ((TOTAL_PASSED++)) || true
151
+ else
152
+ log_error "$test_name failed"
153
+ ((TOTAL_FAILED++)) || true
154
+ fi
155
+ ((TOTAL_TESTS++)) || true
156
+ fi
157
+ done
158
+
159
+ if [[ "$found_tests" == "false" ]]; then
160
+ log_warning "No integration tests found in $TEST_DIR/integration/"
161
+ fi
162
+ }
163
+
164
+ # Main execution
165
+ log_info "๐Ÿงช Starting test suite: $TEST_SUITE"
166
+ echo ""
167
+
168
+ case $TEST_SUITE in
169
+ all)
170
+ run_lib_tests
171
+ echo ""
172
+ run_theme_tests
173
+ echo ""
174
+ run_integration_tests
175
+ ;;
176
+ lib)
177
+ run_lib_tests
178
+ ;;
179
+ theme)
180
+ run_theme_tests
181
+ ;;
182
+ integration)
183
+ run_integration_tests
184
+ ;;
185
+ esac
186
+
187
+ # Summary
188
+ echo ""
189
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
190
+ log_info "Test Summary"
191
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
192
+ echo " Total test suites: $TOTAL_TESTS"
193
+ echo " Passed: $TOTAL_PASSED"
194
+ echo " Failed: $TOTAL_FAILED"
195
+ echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"
196
+
197
+ if [[ $TOTAL_FAILED -gt 0 ]]; then
198
+ log_error "Some tests failed!"
199
+ exit 1
200
+ else
201
+ log_success "All tests passed!"
202
+ exit 0
203
+ fi