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/scripts/version.sh DELETED
@@ -1,178 +0,0 @@
1
- #!/bin/bash
2
-
3
- # ============================================================================
4
- # DEPRECATED: This script is deprecated and will be removed in a future release.
5
- #
6
- # Please use the modular release system instead:
7
- # - For version management: source scripts/lib/version.sh
8
- # - For full release workflow: scripts/bin/release [patch|minor|major]
9
- #
10
- # The new system provides:
11
- # - Better error handling and dry-run support
12
- # - Automatic changelog generation from commits
13
- # - Modular library architecture
14
- # - Comprehensive testing
15
- #
16
- # This script will continue to work but is no longer maintained.
17
- # ============================================================================
18
-
19
- # Version management script for zer0-mistakes Jekyll theme
20
- # Usage: ./scripts/version.sh [patch|minor|major] [--dry-run]
21
-
22
- set -e
23
-
24
- # Show deprecation warning
25
- echo ""
26
- echo "⚠️ DEPRECATION WARNING: scripts/version.sh is deprecated."
27
- echo " Please use 'scripts/bin/release' instead for the full release workflow."
28
- echo " Or source 'scripts/lib/version.sh' for version management functions."
29
- echo ""
30
- echo " Continuing in 3 seconds... (Press Ctrl+C to abort)"
31
- sleep 3
32
- echo ""
33
-
34
- # Colors for output
35
- RED='\033[0;31m'
36
- GREEN='\033[0;32m'
37
- YELLOW='\033[1;33m'
38
- NC='\033[0m' # No Color
39
-
40
- # Default values
41
- VERSION_TYPE="${1:-patch}"
42
- DRY_RUN=false
43
-
44
- # Parse arguments
45
- while [[ $# -gt 0 ]]; do
46
- case $1 in
47
- --dry-run)
48
- DRY_RUN=true
49
- shift
50
- ;;
51
- patch|minor|major)
52
- VERSION_TYPE="$1"
53
- shift
54
- ;;
55
- *)
56
- echo -e "${RED}Unknown option: $1${NC}"
57
- exit 1
58
- ;;
59
- esac
60
- done
61
-
62
- # Function to log messages
63
- log() {
64
- echo -e "${GREEN}[VERSION]${NC} $1"
65
- }
66
-
67
- warn() {
68
- echo -e "${YELLOW}[WARNING]${NC} $1"
69
- }
70
-
71
- error() {
72
- echo -e "${RED}[ERROR]${NC} $1"
73
- exit 1
74
- }
75
-
76
- # Check if we're in a git repository
77
- if ! git rev-parse --git-dir > /dev/null 2>&1; then
78
- error "Not in a git repository"
79
- fi
80
-
81
- # Check if working directory is clean
82
- if [[ -n $(git status --porcelain) ]]; then
83
- error "Working directory is not clean. Please commit or stash changes first."
84
- fi
85
-
86
- # Check if version.rb exists
87
- if [[ ! -f "lib/jekyll-theme-zer0/version.rb" ]]; then
88
- error "lib/jekyll-theme-zer0/version.rb not found"
89
- fi
90
-
91
- # Check if gemspec exists
92
- if [[ ! -f "jekyll-theme-zer0.gemspec" ]]; then
93
- error "jekyll-theme-zer0.gemspec not found"
94
- fi
95
-
96
- # Get current version from Ruby version file
97
- CURRENT_VERSION=$(grep -o 'VERSION = "[^"]*"' lib/jekyll-theme-zer0/version.rb | sed 's/VERSION = "\(.*\)"/\1/')
98
- if [[ -z "$CURRENT_VERSION" ]]; then
99
- error "Could not read version from lib/jekyll-theme-zer0/version.rb"
100
- fi
101
-
102
- log "Current version: $CURRENT_VERSION"
103
-
104
- # Calculate new version
105
- IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
106
- MAJOR=${VERSION_PARTS[0]}
107
- MINOR=${VERSION_PARTS[1]}
108
- PATCH=${VERSION_PARTS[2]}
109
-
110
- case $VERSION_TYPE in
111
- major)
112
- MAJOR=$((MAJOR + 1))
113
- MINOR=0
114
- PATCH=0
115
- ;;
116
- minor)
117
- MINOR=$((MINOR + 1))
118
- PATCH=0
119
- ;;
120
- patch)
121
- PATCH=$((PATCH + 1))
122
- ;;
123
- esac
124
-
125
- NEW_VERSION="$MAJOR.$MINOR.$PATCH"
126
- log "New version: $NEW_VERSION"
127
-
128
- if [[ "$DRY_RUN" == true ]]; then
129
- log "Dry run mode - no changes will be made"
130
- log "Would update version from $CURRENT_VERSION to $NEW_VERSION"
131
- exit 0
132
- fi
133
-
134
- # Update version.rb
135
- log "Updating lib/jekyll-theme-zer0/version.rb..."
136
- sed -i.bak "s/VERSION = \".*\"/VERSION = \"$NEW_VERSION\"/" lib/jekyll-theme-zer0/version.rb
137
- rm lib/jekyll-theme-zer0/version.rb.bak 2>/dev/null || true
138
-
139
- # Update package.json to keep in sync
140
- if [[ -f "package.json" ]]; then
141
- log "Updating package.json..."
142
- jq ".version = \"$NEW_VERSION\"" package.json > package.json.tmp && mv package.json.tmp package.json
143
- fi
144
-
145
- # Validate gemspec can be built
146
- log "Validating gemspec..."
147
- if ! gem build jekyll-theme-zer0.gemspec > /dev/null 2>&1; then
148
- error "Failed to build gemspec"
149
- fi
150
-
151
- # Clean up test gem file
152
- rm -f jekyll-theme-zer0-*.gem
153
-
154
- # Update CHANGELOG if it exists
155
- if [[ -f "CHANGELOG.md" ]]; then
156
- log "Updating CHANGELOG.md..."
157
- DATE=$(date +"%Y-%m-%d")
158
- sed -i.bak "1s/^/## [$NEW_VERSION] - $DATE\n\n### Changed\n- Version bump to $NEW_VERSION\n\n/" CHANGELOG.md
159
- rm CHANGELOG.md.bak 2>/dev/null || true
160
- fi
161
-
162
- # Git operations
163
- log "Committing changes..."
164
- git add lib/jekyll-theme-zer0/version.rb
165
- [[ -f "package.json" ]] && git add package.json
166
- [[ -f "CHANGELOG.md" ]] && git add CHANGELOG.md
167
- git commit -m "chore: bump version to $NEW_VERSION"
168
-
169
- log "Creating git tag..."
170
- git tag -a "v$NEW_VERSION" -m "Release version $NEW_VERSION"
171
-
172
- log "Version bump complete!"
173
- log "Current version: $NEW_VERSION"
174
- log "Tagged as: v$NEW_VERSION"
175
- log ""
176
- log "Next steps:"
177
- log "1. Run 'git push origin main --tags' to push changes and tags"
178
- log "2. Run './scripts/build.sh' to build and publish the gem"