jekyll-theme-zer0 0.22.20 → 0.22.21

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 980b31bacaacb76414bff954016a5a98c83e175ec3ef2361e15e1ec175718073
4
- data.tar.gz: a2b223a9ff562ce39b12a3106ca343c62c0d76060d50550576ee853504ece84f
3
+ metadata.gz: 2aacda403198b850de5d92f7772711bb966a67f97cb631e5004c858c5b0e7abe
4
+ data.tar.gz: 1a650590947487377be84dc2c02fb56d18f443f4e60c470869393ffe013c10cf
5
5
  SHA512:
6
- metadata.gz: 16db6007e716e176b0188981a391b8aafab303f646c900a110e5386ea68eb6aeea8fcbb542d5529df1309bcf9518a8adbbcc47eaf85b2625b42eadce9544a121
7
- data.tar.gz: a2ea2ab6d1caf59e13a9d14e80e4ecc0870ff13c80f5eefa703de8416f289e9f382c23f9f34cfdddba08ee8186f3b3fcb73fd995bfaa559b01b032add3e56b90
6
+ metadata.gz: c33bdf8c1943e8a52b35fc70290b4f895449b3fed491ff3869ffdd0b86d4989e89924eeb4bd0b590259badce91f2c89c32f3e353580b19de4660346bb095a544
7
+ data.tar.gz: 90bcf614157a4208fb86152fd3f403065a3f6bb906bf51151bbef8536ebb4e3d1093427768cf62c0027bf332bbc35333248f0fa5851b743bed51b5ada80b34cf
data/CHANGELOG.md CHANGED
@@ -1,30 +1,27 @@
1
1
  # Changelog
2
2
 
3
- ## [0.22.20] - 2026-04-19
3
+ ## [0.22.21] - 2026-04-19
4
4
 
5
5
  ### Changed
6
6
  - Version bump: patch release
7
7
 
8
8
  ### Commits in this release
9
- - f5d5e97 fix(ui): UI/UX fixes navbar dropdown, landing hero, cookie banner, nanobar, footer (#72)
10
-
11
-
12
- ## [0.22.19] - 2026-04-18
13
-
14
- ### Changed
15
- - Version bump: patch release
16
-
17
- ### Commits in this release
18
- - 1b3993e docs(fork): add fork-to-deploy workflow and user site guidance (#56)
9
+ - 7f00e4d docs(roadmap): data-driven roadmap with auto-generated README mermaid diagram (#71)
19
10
 
20
11
 
21
12
  ## [Unreleased]
22
13
 
23
14
  ### Added
15
+ - **Roadmap data file**: `_data/roadmap.yml` is now the single source of truth for the project roadmap (versions, status, dates, targets, and feature highlights).
16
+ - **Roadmap generator**: `scripts/generate-roadmap.rb` (and shell wrapper `scripts/generate-roadmap.sh`) renders a Mermaid gantt diagram and summary table from `_data/roadmap.yml` and injects them into `README.md` between `<!-- ROADMAP_MERMAID:START/END -->` and `<!-- ROADMAP_TABLE:START/END -->` markers. Supports `--check` mode for CI drift detection and `--stdout` for previewing.
17
+ - **Roadmap sync workflow**: `.github/workflows/roadmap-sync.yml` regenerates the README on push to `main` when the data file or generator changes, and verifies sync on PRs that touch those files.
24
18
  - **Docs**: `docs/FORKING.md` — progressive fork → configure → personalize workflow for the `username.github.io` user-site pattern
25
19
  - **Tests**: `test/test_fork_cleanup.sh` — 32-assertion suite covering CLI parsing, dry-run, real cleanup, YAML anchor preservation, and idempotency
26
20
 
27
21
  ### Changed
22
+ - **README roadmap section** is now auto-generated from `_data/roadmap.yml` instead of being hand-maintained, and includes status, target, and detailed highlight columns.
23
+ - **`pages/roadmap.md`** rewritten to render the Mermaid gantt chart, release summary, and per-version detail sections directly from `_data/roadmap.yml` via Liquid — so the Jekyll page is always live with the canonical data.
24
+ - **`_data/README.md`** documents the new `roadmap.yml` data file.
28
25
  - **Landing page**: `_includes/landing/landing-install-cards.html` — “Fork & Deploy” card now guides users to fork into `<username>.github.io` and run `scripts/fork-cleanup.sh`; safer `github_fork` URL handling
29
26
  - **README**: `README.md` — Method 3 (Fork & Customize) reframed as “Fork & Deploy as Your Site” with a 4-step path; deployment section updated for user-site flow
30
27
  - **Docs**: `pages/_quickstart/github-setup.md`, `pages/_quickstart/index.md`, `pages/_docs/getting-started/quick-start.md`, `pages/_docs/deployment/github-pages.md`, `docs/configuration/url-configuration-guide.md` — aligned with the user-site fork pattern (`baseurl: ""`)
@@ -37,6 +34,24 @@
37
34
  - **Fork cleanup**: `scripts/fork-cleanup.sh` — `posthog`/`giscus` blocks reset only within their own YAML range (no stray matches in unrelated blocks)
38
35
  - **Welcome post**: `templates/pages/welcome-post.md.template` and embedded fallback in `scripts/fork-cleanup.sh` — corrected `layout: journals` → `layout: article` so the generated welcome post builds without “Layout does not exist” warnings on a freshly cleaned fork
39
36
 
37
+ ## [0.22.20] - 2026-04-19
38
+
39
+ ### Changed
40
+ - Version bump: patch release
41
+
42
+ ### Commits in this release
43
+ - f5d5e97 fix(ui): UI/UX fixes — navbar dropdown, landing hero, cookie banner, nanobar, footer (#72)
44
+
45
+
46
+ ## [0.22.19] - 2026-04-18
47
+
48
+ ### Changed
49
+ - Version bump: patch release
50
+
51
+ ### Commits in this release
52
+ - 1b3993e docs(fork): add fork-to-deploy workflow and user site guidance (#56)
53
+
54
+
40
55
  ## [0.22.18] - 2026-04-18
41
56
 
42
57
  ### Changed
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  title: zer0-mistakes
3
3
  sub-title: Jekyll Theme
4
4
  description: GitHub Pages compatible Jekyll theme with Bootstrap 5.3, featuring automated installation and comprehensive documentation.
5
- version: 0.22.20
5
+ version: 0.22.21
6
6
  layout: landing
7
7
  tags:
8
8
  - jekyll
@@ -14,7 +14,7 @@ categories:
14
14
  - docker
15
15
  - bootstrap
16
16
  created: 2024-02-10T23:51:11.480Z
17
- lastmod: 2026-04-19T16:29:09.000Z
17
+ lastmod: 2026-04-19T17:07:38.000Z
18
18
  draft: false
19
19
  permalink: /
20
20
  slug: zer0
@@ -708,33 +708,47 @@ bash scripts/release major # 0.21.5 → 1.0.0
708
708
 
709
709
  ## 🗺 Roadmap
710
710
 
711
- See the full [Roadmap page](/roadmap/) for detailed plans and timeline.
711
+ The diagram and table below are auto-generated from [`_data/roadmap.yml`](_data/roadmap.yml) by [`scripts/generate-roadmap.sh`](scripts/generate-roadmap.sh). See the full [Roadmap page](/roadmap/) for per-version detail and the [PRD](docs/PRD.md) for product context.
712
+
713
+ <!-- ROADMAP_MERMAID:START -->
712
714
 
713
715
  ```mermaid
714
716
  gantt
715
717
  title zer0-mistakes Roadmap
716
718
  dateFormat YYYY-MM
717
719
  section Completed
718
- v0.17 ES6 Navigation :done, 2025-12, 2025-12
719
- v0.18 Site Search :done, 2026-01, 2026-01
720
- v0.19 Feature Discovery :done, 2026-01, 2026-01
721
- v0.20 Navigation Redesign :done, 2026-02, 2026-02
722
- v0.21 Env Switcher :done, 2026-02, 2026-03
720
+ v0.17 ES6 Navigation :done, 2025-12, 2025-12
721
+ v0.18 Site Search :done, 2026-01, 2026-01
722
+ v0.19 Feature Discovery :done, 2026-01, 2026-01
723
+ v0.20 Navigation Redesign :done, 2026-02, 2026-02
724
+ v0.21 Env Switcher :done, 2026-02, 2026-03
723
725
  section Current
724
- v0.22 AIEO Optimization :active, 2026-03, 2026-04
726
+ v0.22 AIEO & Customization :active, 2026-03, 2026-04
725
727
  section Future
726
- v0.23 CMS Integration :2026-05, 2026-07
727
- v0.24 i18n Support :2026-07, 2026-09
728
- v1.0 Stable Release :milestone, 2027-01, 1d
728
+ v0.23 CMS Integration :2026-05, 2026-07
729
+ v0.24 i18n Support :2026-07, 2026-09
730
+ v0.25 Advanced Analytics :2026-09, 2026-11
731
+ v1.0 Stable Release :milestone, 2027-01, 1d
729
732
  ```
730
733
 
731
- | Version | Target | Features |
732
- |---------|--------|----------|
733
- | **v0.21** | Completed | Environment switcher, navigation redesign, settings modal |
734
- | **v0.22** | Q1 2026 | AIEO optimization, structured data, FAQ, glossary |
735
- | **v0.23** | Q2 2026 | Headless CMS integration, content API |
736
- | **v0.24** | Q3 2026 | Multi-language support (i18n) |
737
- | **v1.0** | Q1 2027 | Stable API, 90%+ test coverage |
734
+ <!-- ROADMAP_MERMAID:END -->
735
+
736
+ <!-- ROADMAP_TABLE:START -->
737
+
738
+ | Version | Status | Target | Highlights |
739
+ |---------|--------|--------|------------|
740
+ | **v0.17** | Completed | Dec 2025 | ES6 modular navigation with auto-hide navbar, hover dropdowns, keyboard navigation, and touch gestures. |
741
+ | **v0.18** | ✅ Completed | Jan 2026 | Client-side site search with a keyboard-shortcut search modal. |
742
+ | **v0.19** | ✅ Completed | Jan 2026 | 43 documented features with a comprehensive feature registry. |
743
+ | **v0.20** | ✅ Completed | Feb 2026 | Local Docker publishing pipeline and CI variable abstraction. |
744
+ | **v0.21** | ✅ Completed | Feb 2026 | Environment switcher, settings modal redesign, and RubyGems API-key auth. |
745
+ | **v0.22** | 🚧 In Progress | Q1–Q2 2026 | AI Engine Optimization (AIEO), structured data, and visual customization tools. |
746
+ | **v0.23** | 🗓 Planned | Q2 2026 | Headless CMS integration with a content API and admin dashboard. |
747
+ | **v0.24** | 🗓 Planned | Q3 2026 | Multi-language content support with locale-aware routing. |
748
+ | **v0.25** | 🗓 Planned | Q4 2026 | Visual theme customizer, A/B testing, and conversion funnels. |
749
+ | **v1.0** | 🎯 Milestone | Q1 2027 | Stable public API, 90%+ test coverage, and long-term support commitment. |
750
+
751
+ <!-- ROADMAP_TABLE:END -->
738
752
 
739
753
  ---
740
754
 
@@ -789,7 +803,7 @@ git push origin feature/awesome-feature
789
803
 
790
804
  | Metric | Value |
791
805
  |--------|-------|
792
- | **Current Version** | 0.22.20 ([RubyGems](https://rubygems.org/gems/jekyll-theme-zer0), [CHANGELOG](/CHANGELOG)) |
806
+ | **Current Version** | 0.22.21 ([RubyGems](https://rubygems.org/gems/jekyll-theme-zer0), [CHANGELOG](/CHANGELOG)) |
793
807
  | **Documented Features** | 43 ([Feature Registry](https://github.com/bamr87/zer0-mistakes/blob/main/_data/features.yml)) |
794
808
  | **Setup Time** | 2-5 minutes ([install.sh benchmarks](https://github.com/bamr87/zer0-mistakes/blob/main/install.sh)) |
795
809
  | **Documentation Pages** | 70+ ([browse docs](/pages/)) |
@@ -832,6 +846,6 @@ Built with these amazing technologies:
832
846
 
833
847
  **Built with ❤️ for the Jekyll community**
834
848
 
835
- **v0.22.20** • [Changelog](CHANGELOG.md) • [License](LICENSE) • [Contributing](CONTRIBUTING.md)
849
+ **v0.22.21** • [Changelog](CHANGELOG.md) • [License](LICENSE) • [Contributing](CONTRIBUTING.md)
836
850
 
837
851
 
data/_data/README.md CHANGED
@@ -9,6 +9,7 @@ This directory contains YAML data files that power the Zer0-Mistakes Jekyll them
9
9
  | `navigation/` | Site navigation menus | No |
10
10
  | `authors.yml` | Author profile information | No |
11
11
  | `content_statistics.yml` | Site content analytics | **Yes** |
12
+ | `roadmap.yml` | Single source of truth for the project roadmap (drives the README mermaid diagram and the `/roadmap/` Jekyll page) | No |
12
13
  | `statistics_config.yml` | Statistics generation config | No |
13
14
  | `ui-text.yml` | Multilingual UI text labels | No |
14
15
  | `prerequisites.yml` | Educational prerequisites | No |
data/_data/roadmap.yml ADDED
@@ -0,0 +1,215 @@
1
+ # =============================================================================
2
+ # zer0-mistakes Roadmap — Single Source of Truth
3
+ # =============================================================================
4
+ #
5
+ # This file is the canonical source for the project roadmap. It powers:
6
+ #
7
+ # 1. The Mermaid gantt diagram and summary table in README.md
8
+ # (auto-generated by `scripts/generate-roadmap.sh` between
9
+ # <!-- ROADMAP_MERMAID:START --> / <!-- ROADMAP_MERMAID:END -->
10
+ # and <!-- ROADMAP_TABLE:START --> / <!-- ROADMAP_TABLE:END --> markers).
11
+ #
12
+ # 2. The /roadmap/ Jekyll page (`pages/roadmap.md`), which renders the
13
+ # diagram, release history, and per-version sections directly from
14
+ # this file via Liquid (always live on the site).
15
+ #
16
+ # To update the roadmap:
17
+ # 1. Edit this file.
18
+ # 2. Run `./scripts/generate-roadmap.sh` to refresh the README.
19
+ # 3. Commit both this file and the resulting README.md changes.
20
+ #
21
+ # A GitHub Actions workflow (`.github/workflows/roadmap-sync.yml`) also runs
22
+ # the generator automatically on push when this file changes.
23
+ #
24
+ # =============================================================================
25
+ # Schema
26
+ # =============================================================================
27
+ #
28
+ # meta:
29
+ # title: Title displayed in the Mermaid gantt chart
30
+ # tagline: Short tagline shown on the roadmap page
31
+ # updated: Last-reviewed date (YYYY-MM-DD)
32
+ #
33
+ # milestones:
34
+ # - version: Semantic version string (e.g. "0.22")
35
+ # title: Theme/feature name (short)
36
+ # status: completed | active | planned | milestone
37
+ # section: Group label in the gantt (Completed / Current / Future)
38
+ # start: Start month (YYYY-MM) — required
39
+ # end: End month (YYYY-MM) — required for ranges
40
+ # target: Human-readable target (e.g. "Q2 2026")
41
+ # released: Actual release date for shipped versions (YYYY-MM-DD)
42
+ # summary: One-line description
43
+ # features: List of bullet points (used on the roadmap page)
44
+ #
45
+ # =============================================================================
46
+
47
+ meta:
48
+ title: "zer0-mistakes Roadmap"
49
+ tagline: "Past releases, current focus, and future plans for the zer0-mistakes Jekyll theme."
50
+ updated: 2026-04-18
51
+
52
+ milestones:
53
+ # --- Completed -------------------------------------------------------------
54
+
55
+ - version: "0.17"
56
+ title: "ES6 Navigation"
57
+ status: completed
58
+ section: Completed
59
+ start: 2025-12
60
+ end: 2025-12
61
+ released: 2025-12-15
62
+ summary: "ES6 modular navigation with auto-hide navbar, hover dropdowns, keyboard navigation, and touch gestures."
63
+ features:
64
+ - "ES6 navigation modules"
65
+ - "Auto-hide navbar on scroll"
66
+ - "Hover dropdowns with keyboard navigation"
67
+ - "Touch gestures for mobile"
68
+
69
+ - version: "0.18"
70
+ title: "Site Search"
71
+ status: completed
72
+ section: Completed
73
+ start: 2026-01
74
+ end: 2026-01
75
+ released: 2026-01-15
76
+ summary: "Client-side site search with a keyboard-shortcut search modal."
77
+ features:
78
+ - "Client-side search index"
79
+ - "Search modal with keyboard shortcuts"
80
+ - "GitHub Pages compatible (no server required)"
81
+
82
+ - version: "0.19"
83
+ title: "Feature Discovery"
84
+ status: completed
85
+ section: Completed
86
+ start: 2026-01
87
+ end: 2026-01
88
+ released: 2026-01-25
89
+ summary: "43 documented features with a comprehensive feature registry."
90
+ features:
91
+ - "Feature registry in `_data/features.yml`"
92
+ - "User-facing feature pages"
93
+ - "Cross-linked from documentation"
94
+
95
+ - version: "0.20"
96
+ title: "Navigation Redesign"
97
+ status: completed
98
+ section: Completed
99
+ start: 2026-02
100
+ end: 2026-02
101
+ released: 2026-02-01
102
+ summary: "Local Docker publishing pipeline and CI variable abstraction."
103
+ features:
104
+ - "Local Docker publishing pipeline"
105
+ - "CI variable abstraction"
106
+ - "Navigation refactor"
107
+
108
+ - version: "0.21"
109
+ title: "Env Switcher"
110
+ status: completed
111
+ section: Completed
112
+ start: 2026-02
113
+ end: 2026-03
114
+ released: 2026-02-01
115
+ summary: "Environment switcher, settings modal redesign, and RubyGems API-key auth."
116
+ features:
117
+ - "Environment switcher"
118
+ - "Settings modal with tabs"
119
+ - "RubyGems API-key authentication"
120
+ - "Dependency updates"
121
+
122
+ # --- Current ---------------------------------------------------------------
123
+
124
+ - version: "0.22"
125
+ title: "AIEO & Customization"
126
+ status: active
127
+ section: Current
128
+ start: 2026-03
129
+ end: 2026-04
130
+ target: "Q1–Q2 2026"
131
+ summary: "AI Engine Optimization (AIEO), structured data, and visual customization tools."
132
+ features:
133
+ - "JSON-LD `SoftwareApplication`, `WebPage`, `Person`, and `FAQPage` schemas"
134
+ - "Author E-E-A-T visibility block on the landing page"
135
+ - "FAQ page with FAQPage schema"
136
+ - "Glossary with key term definitions"
137
+ - "Roadmap page with temporal anchoring"
138
+ - "Citation hooks on project stats"
139
+ - "Skin editor with live color pickers and palette generator"
140
+ - "Admin layout and configuration dashboards"
141
+ - "Playwright visual regression tests"
142
+ - "Vendored assets (Bootstrap, Icons, Mermaid — no runtime CDN)"
143
+ - "Copilot Agent prompt button with data-driven prompt registry"
144
+ - "Universal installer (remote / github / codespaces modes)"
145
+ - "Dynamic collection-based navigation fallback for zero-config sites"
146
+
147
+ # --- Future ----------------------------------------------------------------
148
+
149
+ - version: "0.23"
150
+ title: "CMS Integration"
151
+ status: planned
152
+ section: Future
153
+ start: 2026-05
154
+ end: 2026-07
155
+ target: "Q2 2026"
156
+ summary: "Headless CMS integration with a content API and admin dashboard."
157
+ features:
158
+ - "Headless CMS integration (Decap CMS or Tina)"
159
+ - "Content API for programmatic access"
160
+ - "Admin dashboard for content management"
161
+ - "Draft preview workflow"
162
+ - "Multi-author collaboration"
163
+
164
+ - version: "0.24"
165
+ title: "i18n Support"
166
+ status: planned
167
+ section: Future
168
+ start: 2026-07
169
+ end: 2026-09
170
+ target: "Q3 2026"
171
+ summary: "Multi-language content support with locale-aware routing."
172
+ features:
173
+ - "Multi-language content support"
174
+ - "Locale-aware routing"
175
+ - "Translated UI strings via `_data/ui-text.yml`"
176
+ - "Right-to-left (RTL) layout support"
177
+
178
+ - version: "0.25"
179
+ title: "Advanced Analytics"
180
+ status: planned
181
+ section: Future
182
+ start: 2026-09
183
+ end: 2026-11
184
+ target: "Q4 2026"
185
+ summary: "Visual theme customizer, A/B testing, and conversion funnels."
186
+ features:
187
+ - "A/B testing framework"
188
+ - "Conversion funnels"
189
+ - "Heatmap visualization"
190
+ - "Visual theme customizer enhancements"
191
+
192
+ - version: "1.0"
193
+ title: "Stable Release"
194
+ status: milestone
195
+ section: Future
196
+ start: 2027-01
197
+ end: 2027-01
198
+ target: "Q1 2027"
199
+ summary: "Stable public API, 90%+ test coverage, and long-term support commitment."
200
+ features:
201
+ - "Stable public API for theme customization"
202
+ - "90%+ automated test coverage"
203
+ - "Migration guide from Minima and other themes"
204
+ - "Performance benchmarks met"
205
+ - "Security audit passed"
206
+ - "Long-term support (LTS) commitment"
207
+
208
+ # =============================================================================
209
+ # Prioritization signals
210
+ # =============================================================================
211
+ prioritization:
212
+ - "Community feedback — GitHub Issues and Discussions"
213
+ - "Usage analytics — privacy-compliant PostHog data on feature adoption"
214
+ - "Ecosystem changes — Jekyll, Bootstrap, and GitHub Pages updates"
215
+ - "Contributor interest — open feature requests that attract PRs"
@@ -0,0 +1,200 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # =============================================================================
5
+ # generate-roadmap.rb
6
+ # =============================================================================
7
+ #
8
+ # Reads `_data/roadmap.yml` and updates the README.md roadmap section in-place.
9
+ #
10
+ # It rewrites two regions delimited by HTML comment markers:
11
+ #
12
+ # <!-- ROADMAP_MERMAID:START --> ... <!-- ROADMAP_MERMAID:END -->
13
+ # <!-- ROADMAP_TABLE:START --> ... <!-- ROADMAP_TABLE:END -->
14
+ #
15
+ # Usage:
16
+ # ruby scripts/generate-roadmap.rb # update README.md in place
17
+ # ruby scripts/generate-roadmap.rb --check # exit non-zero if README is stale
18
+ # ruby scripts/generate-roadmap.rb --stdout # print regenerated sections only
19
+ #
20
+ # This script has no gem dependencies beyond the Ruby stdlib.
21
+ # =============================================================================
22
+
23
+ require 'yaml'
24
+ require 'date'
25
+ require 'optparse'
26
+
27
+ ROOT = File.expand_path('..', __dir__)
28
+ DATA_FILE = File.join(ROOT, '_data', 'roadmap.yml')
29
+ README = File.join(ROOT, 'README.md')
30
+
31
+ MERMAID_START = '<!-- ROADMAP_MERMAID:START -->'
32
+ MERMAID_END = '<!-- ROADMAP_MERMAID:END -->'
33
+ TABLE_START = '<!-- ROADMAP_TABLE:START -->'
34
+ TABLE_END = '<!-- ROADMAP_TABLE:END -->'
35
+
36
+ # Width used to right-pad the gantt label column so the `:status, start, end`
37
+ # tail aligns vertically. Adjust if very long version/title combinations show up.
38
+ GANTT_LABEL_WIDTH = 28
39
+
40
+ # ---------------------------------------------------------------------------
41
+ # Rendering helpers
42
+ # ---------------------------------------------------------------------------
43
+
44
+ # Mermaid gantt task line for a single milestone.
45
+ #
46
+ # v0.22 AIEO Optimization :active, 2026-03, 2026-04
47
+ # v1.0 Stable Release :milestone, 2027-01, 1d
48
+ #
49
+ def gantt_task(milestone)
50
+ label = "v#{milestone['version']} #{milestone['title']}"
51
+ status = milestone['status'].to_s
52
+ start = milestone['start']
53
+ finish = milestone['end'] || milestone['start']
54
+
55
+ prefix =
56
+ case status
57
+ when 'completed' then 'done, '
58
+ when 'active' then 'active, '
59
+ when 'milestone' then 'milestone, '
60
+ else ''
61
+ end
62
+
63
+ range = status == 'milestone' ? "#{start}, 1d" : "#{start}, #{finish}"
64
+ " #{label.ljust(GANTT_LABEL_WIDTH)} :#{prefix}#{range}"
65
+ end
66
+
67
+ def render_mermaid(data)
68
+ title = data.dig('meta', 'title') || 'zer0-mistakes Roadmap'
69
+ milestones = data['milestones'] || []
70
+
71
+ # Group by section while preserving the order in which sections first appear.
72
+ sections = milestones.group_by { |m| m['section'] || 'Roadmap' }
73
+ ordered = milestones.map { |m| m['section'] }.uniq
74
+
75
+ lines = []
76
+ lines << '```mermaid'
77
+ lines << 'gantt'
78
+ lines << " title #{title}"
79
+ lines << ' dateFormat YYYY-MM'
80
+ ordered.each do |section|
81
+ lines << " section #{section}"
82
+ sections[section].each { |m| lines << gantt_task(m) }
83
+ end
84
+ lines << '```'
85
+ lines.join("\n")
86
+ end
87
+
88
+ # Status → human-readable target column for the summary table.
89
+ def target_label(milestone)
90
+ case milestone['status']
91
+ when 'completed'
92
+ if (released = milestone['released'])
93
+ Date.parse(released.to_s).strftime('%b %Y')
94
+ else
95
+ 'Completed'
96
+ end
97
+ when 'active'
98
+ milestone['target'] || 'In progress'
99
+ when 'milestone', 'planned'
100
+ milestone['target'] || milestone['start']
101
+ else
102
+ milestone['target'] || ''
103
+ end
104
+ end
105
+
106
+ def render_table(data)
107
+ rows = (data['milestones'] || []).map do |m|
108
+ version = "**v#{m['version']}**"
109
+ target = target_label(m)
110
+ summary = m['summary'] || ''
111
+ status_emoji =
112
+ case m['status']
113
+ when 'completed' then '✅ Completed'
114
+ when 'active' then '🚧 In Progress'
115
+ when 'milestone' then '🎯 Milestone'
116
+ else '🗓 Planned'
117
+ end
118
+ "| #{version} | #{status_emoji} | #{target} | #{summary} |"
119
+ end
120
+
121
+ header = [
122
+ '| Version | Status | Target | Highlights |',
123
+ '|---------|--------|--------|------------|'
124
+ ]
125
+
126
+ (header + rows).join("\n")
127
+ end
128
+
129
+ def replace_block(content, marker_start, marker_end, replacement)
130
+ pattern = /(#{Regexp.escape(marker_start)})(.*?)(#{Regexp.escape(marker_end)})/m
131
+ unless content.match?(pattern)
132
+ raise "Markers not found in README: #{marker_start} ... #{marker_end}"
133
+ end
134
+
135
+ # Surround the replacement with blank lines so kramdown parses the following
136
+ # markdown (especially tables) instead of treating it as part of the HTML
137
+ # comment block. Without the blank line after `<!-- ... -->`, GFM tables
138
+ # collapse into a single paragraph.
139
+ content.sub(pattern, "\\1\n\n#{replacement}\n\n\\3")
140
+ end
141
+
142
+ # ---------------------------------------------------------------------------
143
+ # Main
144
+ # ---------------------------------------------------------------------------
145
+
146
+ def main
147
+ options = { mode: :write }
148
+ OptionParser.new do |opts|
149
+ opts.banner = 'Usage: generate-roadmap.rb [--check|--stdout]'
150
+ opts.on('--check', 'Exit non-zero if README would change') { options[:mode] = :check }
151
+ opts.on('--stdout', 'Print regenerated sections to stdout') { options[:mode] = :stdout }
152
+ end.parse!
153
+
154
+ # The roadmap data only contains scalars and Date values; Symbol is not used,
155
+ # but Date/Time must be permitted because YAML's safe loader rejects them by default.
156
+ # Ruby >= 3.1 supports `permitted_classes:` on `YAML.load_file`. On older Rubies
157
+ # (e.g. macOS system Ruby 2.6), fall back to `safe_load` which accepted the
158
+ # keyword earlier, so the generator works for contributors without rbenv/rvm.
159
+ data =
160
+ begin
161
+ YAML.load_file(DATA_FILE, permitted_classes: [Date, Time])
162
+ rescue ArgumentError
163
+ YAML.safe_load(File.read(DATA_FILE), permitted_classes: [Date, Time], aliases: false)
164
+ end
165
+ mermaid = render_mermaid(data)
166
+ table = render_table(data)
167
+
168
+ if options[:mode] == :stdout
169
+ puts mermaid
170
+ puts
171
+ puts table
172
+ return 0
173
+ end
174
+
175
+ original = File.read(README)
176
+ updated = original.dup
177
+ updated = replace_block(updated, MERMAID_START, MERMAID_END, mermaid)
178
+ updated = replace_block(updated, TABLE_START, TABLE_END, table)
179
+
180
+ if options[:mode] == :check
181
+ if original == updated
182
+ puts '✓ README.md roadmap section is up to date with _data/roadmap.yml'
183
+ return 0
184
+ else
185
+ warn '✗ README.md roadmap section is out of date with _data/roadmap.yml'
186
+ warn ' Run: ./scripts/generate-roadmap.sh'
187
+ return 1
188
+ end
189
+ end
190
+
191
+ if original == updated
192
+ puts 'README.md roadmap section already up to date.'
193
+ else
194
+ File.write(README, updated)
195
+ puts "Updated README.md roadmap section from #{File.basename(DATA_FILE)}."
196
+ end
197
+ 0
198
+ end
199
+
200
+ exit main if $PROGRAM_NAME == __FILE__
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+ # =============================================================================
3
+ # generate-roadmap.sh
4
+ # =============================================================================
5
+ #
6
+ # Thin wrapper around scripts/generate-roadmap.rb.
7
+ #
8
+ # Reads `_data/roadmap.yml` and rewrites the auto-generated roadmap regions
9
+ # of README.md (Mermaid gantt diagram + summary table) in place.
10
+ #
11
+ # Usage:
12
+ # ./scripts/generate-roadmap.sh # update README.md
13
+ # ./scripts/generate-roadmap.sh --check # CI-friendly drift detection
14
+ # ./scripts/generate-roadmap.sh --stdout # print regenerated sections only
15
+ #
16
+ # =============================================================================
17
+
18
+ set -euo pipefail
19
+
20
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
21
+ exec ruby "${SCRIPT_DIR}/generate-roadmap.rb" "$@"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-zer0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.20
4
+ version: 0.22.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
@@ -96,6 +96,7 @@ files:
96
96
  - _data/posts_organization.yml
97
97
  - _data/prerequisites.yml
98
98
  - _data/prompts.yml
99
+ - _data/roadmap.yml
99
100
  - _data/statistics_config.yml
100
101
  - _data/theme_backgrounds.yml
101
102
  - _data/ui-text.yml
@@ -366,6 +367,8 @@ files:
366
367
  - scripts/fix-markdown-format.sh
367
368
  - scripts/fork-cleanup.sh
368
369
  - scripts/generate-preview-images.sh
370
+ - scripts/generate-roadmap.rb
371
+ - scripts/generate-roadmap.sh
369
372
  - scripts/github-setup.sh
370
373
  - scripts/init_setup.sh
371
374
  - scripts/install-preview-generator.sh