jekyll-theme-zer0 1.31.2 → 1.32.0

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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +183 -0
  3. data/_data/ai.yml +1 -1
  4. data/_data/backlog.yml +149 -28
  5. data/_data/features.yml +173 -17
  6. data/_data/navigation/admin.yml +26 -8
  7. data/_data/navigation/docs.yml +2 -8
  8. data/_data/site_builder.yml +1 -1
  9. data/_data/theme-manifest.yml +74 -58
  10. data/_data/ui-text.yml +9 -0
  11. data/_includes/README.md +2 -1
  12. data/_includes/analytics/google-analytics.html +46 -9
  13. data/_includes/analytics/posthog.html +101 -77
  14. data/_includes/components/ai-chat.html +3 -3
  15. data/_includes/components/author-bio.html +3 -1
  16. data/_includes/components/author-card.html +9 -9
  17. data/_includes/components/author-eeat.html +13 -3
  18. data/_includes/components/collection-manager.html +2 -2
  19. data/_includes/components/component-showcase.html +7 -7
  20. data/_includes/components/cookie-consent-needed.html +37 -0
  21. data/_includes/components/cookie-consent.html +44 -5
  22. data/_includes/components/page-feedback.html +10 -6
  23. data/_includes/components/post-card.html +2 -2
  24. data/_includes/components/theme-customizer.html +1 -1
  25. data/_includes/content/comments.html +46 -0
  26. data/_includes/content/giscus.html +22 -13
  27. data/_includes/content/intro.html +39 -3
  28. data/_includes/content/jsonld-software.html +4 -9
  29. data/_includes/content/sitemap.html +173 -17
  30. data/_includes/core/favicon.html +42 -6
  31. data/_includes/core/footer.html +38 -17
  32. data/_includes/core/header.html +11 -2
  33. data/_includes/navigation/admin-nav.html +110 -63
  34. data/_includes/navigation/section-sidebar.html +20 -20
  35. data/_includes/navigation/sidebar-config.html +17 -8
  36. data/_includes/navigation/sidebar-right.html +16 -2
  37. data/_includes/setup/wizard.html +2 -2
  38. data/_layouts/README.md +1 -1
  39. data/_layouts/admin.html +49 -20
  40. data/_layouts/article.html +10 -10
  41. data/_layouts/book-story.html +3 -7
  42. data/_layouts/default.html +63 -2
  43. data/_layouts/news.html +8 -7
  44. data/_layouts/note.html +2 -6
  45. data/_layouts/notebook.html +2 -6
  46. data/_layouts/recipe.html +3 -7
  47. data/_layouts/root.html +7 -4
  48. data/_layouts/section.html +43 -42
  49. data/_sass/components/_back-to-top.scss +9 -0
  50. data/_sass/components/_cookie-banner.scss +31 -0
  51. data/_sass/components/_page-feedback.scss +1 -1
  52. data/_sass/components/_ui-enhancements.scss +22 -0
  53. data/_sass/core/_nav-tree.scss +10 -2
  54. data/_sass/core/_navbar.scss +19 -5
  55. data/_sass/core/_obsidian.scss +19 -3
  56. data/_sass/core/_sidebar-categories.scss +4 -2
  57. data/_sass/core/_sidebar-extras.scss +3 -2
  58. data/_sass/layouts/_admin.scss +60 -0
  59. data/_sass/layouts/_navbar-extras.scss +7 -2
  60. data/_sass/theme/_skins.scss +124 -32
  61. data/_sass/tokens/_color.scss +3 -0
  62. data/_sass/tokens/_layers.scss +12 -5
  63. data/_sass/utilities/_focus.scss +12 -1
  64. data/assets/css/main.scss +1 -0
  65. data/assets/js/code-copy.js +30 -2
  66. data/assets/js/modules/navigation/index.js +94 -40
  67. data/assets/js/modules/navigation/scroll-spy.js +70 -7
  68. data/assets/js/setup-wizard.js +2 -2
  69. data/assets/js/ui-enhancements.js +46 -0
  70. data/scripts/ai/README.md +1 -1
  71. data/scripts/ai/api_call.rb +1 -1
  72. data/scripts/bin/audit-consumer +155 -8
  73. data/scripts/bin/manifest +27 -8
  74. data/scripts/bin/validate +3 -2
  75. data/scripts/ci/test_visual_evidence_autogen.py +53 -1
  76. data/scripts/ci/visual_evidence_autogen.py +26 -7
  77. data/scripts/install/ai/client.sh +1 -1
  78. data/scripts/lib/audit.sh +156 -0
  79. data/scripts/lib/preview_generator.py +1 -1
  80. data/scripts/translate.rb +1 -1
  81. data/scripts/validate-features.rb +20 -2
  82. metadata +5 -2
data/scripts/bin/manifest CHANGED
@@ -29,8 +29,9 @@ USAGE:
29
29
  DESCRIPTION:
30
30
  Generates _data/theme-manifest.yml from the current state of the theme
31
31
  repo. The manifest records the version, owned directories, plugin files
32
- that remote-theme consumers must vendor, required config keys, and a
33
- SHA-256 checksum for every themable file.
32
+ that remote-theme consumers must vendor, the theme data they must copy
33
+ (vendored_data_paths), required config keys, and a SHA-256 checksum for
34
+ every themable file and vendored data file.
34
35
 
35
36
  Run automatically by scripts/bin/release before tagging.
36
37
 
@@ -61,12 +62,19 @@ THEMABLE_PATHS=(
61
62
  )
62
63
 
63
64
  # Data files the theme ships that consumers may override with their own content
64
- # (excluded from the overlap audit; listed for documentation only).
65
+ # (excluded from the overlap audit; for a YAML file here, audit-consumer compares
66
+ # only the keys, to catch a consumer copy that lacks a label the theme reads).
65
67
  THEME_DATA_PATHS=(
66
68
  "_data/navigation"
67
69
  "_data/ui-text.yml"
68
70
  )
69
71
 
72
+ # Theme-owned data registries consumers copy verbatim. Jekyll 3.10 never loads
73
+ # a theme's _data/, so these reach a site only as its own copy, which does not
74
+ # float with remote_theme (#556). The list lives in scripts/lib/audit.sh so the
75
+ # consumer audit can fall back to it when it reads an older manifest.
76
+ VENDORED_DATA_PATHS=("${THEME_VENDORED_DATA_PATHS[@]}")
77
+
70
78
  # Plugins that remote_theme consumers MUST vendor locally.
71
79
  #
72
80
  # Deliberately empty. Nothing the theme ships is mandatory for a stock
@@ -136,8 +144,9 @@ TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
136
144
  # Build the per-file checksum block
137
145
  # ---------------------------------------------------------------------------
138
146
  build_checksums() {
139
- for dir in "${THEMABLE_PATHS[@]}"; do
140
- [[ -d "$dir" ]] || continue
147
+ # A vendored data path is a file; find(1) walks a file as readily as a dir.
148
+ for dir in "${THEMABLE_PATHS[@]}" "${VENDORED_DATA_PATHS[@]}"; do
149
+ [[ -e "$dir" ]] || continue
141
150
  while IFS= read -r -d '' file; do
142
151
  local relpath="${file#./}"
143
152
  # Skip README files and compiled/generated output
@@ -160,7 +169,7 @@ MANIFEST_CONTENT=$(cat << YAML
160
169
  # Regenerated automatically during each release (scripts/bin/release).
161
170
  # Consumers use this file via scripts/bin/audit-consumer to detect drift.
162
171
 
163
- version: "${CURRENT_VERSION}"
172
+ version: "${CURRENT_VERSION}" # x-release-please-version
164
173
  generated_at: "${TIMESTAMP}"
165
174
 
166
175
  # Directories owned by this theme. A consumer file in any of these paths
@@ -170,10 +179,19 @@ themable_paths:
170
179
  $(printf ' - %s\n' "${THEMABLE_PATHS[@]}")
171
180
 
172
181
  # Data paths the theme ships but that consumers are *expected* to customise.
173
- # Not included in the shadow audit.
182
+ # Not included in the shadow audit. audit-consumer compares only the keys of a
183
+ # YAML file here: MISSING_KEYS lists the keys of the theme's en: block that a
184
+ # consumer's copy lacks (warn-only).
174
185
  theme_data_paths:
175
186
  $(printf ' - %s\n' "${THEME_DATA_PATHS[@]}")
176
187
 
188
+ # Theme-owned data registries a consumer copies verbatim. Jekyll 3.10 (GitHub
189
+ # Pages) never loads a theme's _data/, so a site reads these only from its own
190
+ # copy, which does not float with remote_theme. audit-consumer flags a copy that
191
+ # has fallen behind as STALE, and --fix refreshes it from the theme.
192
+ vendored_data_paths:
193
+ $(yaml_list_items "${VENDORED_DATA_PATHS[@]}")
194
+
177
195
  # Plugin files a consumer MUST vendor locally. Empty by design: GitHub Pages
178
196
  # builds in safe mode and loads no local plugins at all, so nothing the theme
179
197
  # ships is mandatory for a stock remote_theme consumer.
@@ -201,7 +219,8 @@ config_schema:
201
219
  deprecated:
202
220
  - site_configured # Removed in 1.5.0; safe to delete
203
221
 
204
- # Per-file SHA-256 checksums for every file in themable_paths.
222
+ # Per-file SHA-256 checksums for every file in themable_paths and
223
+ # vendored_data_paths.
205
224
  file_checksums:
206
225
  $(build_checksums)
207
226
  YAML
data/scripts/bin/validate CHANGED
@@ -369,7 +369,8 @@ required_exclusions = [
369
369
  'node_modules/',
370
370
  'vendor/bundle/',
371
371
  'test/',
372
- 'pages/_notes/_templates/'
372
+ 'pages/_notes/_templates/',
373
+ 'studio/'
373
374
  ]
374
375
 
375
376
  # Normalize trailing slashes so '.obsidian' and '.obsidian/' are treated the same;
@@ -395,7 +396,7 @@ end
395
396
  # _config_dev.yml. Those belong to the example, not to this site's config
396
397
  # surface, so prune the tree rather than registering every example's configs in
397
398
  # classified_files below (which would need editing for each new example).
398
- ignored_dirs = %w[.git _site node_modules vendor .jekyll-cache .sass-cache test/fixtures examples]
399
+ ignored_dirs = %w[.git _site node_modules vendor .jekyll-cache .sass-cache test/fixtures examples studio]
399
400
  config_like_files = []
400
401
 
401
402
  Find.find('.') do |path|
@@ -82,6 +82,12 @@ def test_detect_slug() -> None:
82
82
  check("reads OUT = 'test/visual/evidence/<slug>' from a hand-rolled one",
83
83
  vea.detect_slug("const OUT = 'test/visual/evidence/navbar-fit';") == "navbar-fit")
84
84
  check("returns None when nothing names a folder", vea.detect_slug("console.log('hi')") is None)
85
+ hand_rolled = ("const OUT = path.join(process.cwd(), 'test/visual/evidence/dangling-aria-controls');\n"
86
+ "const CASES = [{ slug: 'navbar-toggle-fr-about' }];\n")
87
+ check("the folder a generator writes to beats a per-case `slug:` key",
88
+ vea.detect_slug(hand_rolled) == "dangling-aria-controls")
89
+ check("an explicit `// slug: '…'` comment wins",
90
+ vea.detect_slug("// slug: 'breadcrumbs'\nconst OUT = 'test/visual/evidence/other';") == "breadcrumbs")
85
91
 
86
92
 
87
93
  def test_plan_pr_454_shape() -> None:
@@ -141,6 +147,51 @@ def test_plan_respects_author_evidence() -> None:
141
147
  check("autogen evidence from THIS head is left alone", plan["jobs"] == [])
142
148
 
143
149
 
150
+ def test_plan_edited_existing_generator() -> None:
151
+ print("plan — PR edits an existing generator whose folder already has proof")
152
+ folder = "test/visual/evidence/navbar-tiers-405"
153
+ files = {GEN_405: GEN_405_SRC, f"{folder}/01-before-after.png": "", f"{folder}/metrics.json": "{}"}
154
+ plan = plan_for(["_includes/core/header.html", GEN_405], files)
155
+ check("needed", plan["needed"] is True)
156
+ check("one bespoke re-render of that generator's folder",
157
+ len(plan["jobs"]) == 1 and plan["jobs"][0]["kind"] == "bespoke"
158
+ and plan["jobs"][0]["generator"] == GEN_405 and plan["jobs"][0]["slug"] == "navbar-tiers-405")
159
+ check("…explained as stale evidence", "predates" in (plan["jobs"][0]["why"] if plan["jobs"] else ""))
160
+ plan = plan_for([GEN_405], files)
161
+ check("a generator-only edit (no UI paths) still schedules it", len(plan["jobs"]) == 1)
162
+ plan = plan_for([GEN_405, f"{folder}/01-before-after.png", f"{folder}/metrics.json"], files)
163
+ check("…but not when the PR re-rendered that folder itself", plan["jobs"] == [])
164
+ plan = plan_for(["_layouts/home.html", "test/visual/nameless-evidence.mjs"],
165
+ {"test/visual/nameless-evidence.mjs": "console.log('hi')"})
166
+ check("an edited generator with no detectable slug falls back to the generic job",
167
+ len(plan["jobs"]) == 1 and plan["jobs"][0]["kind"] == "generic")
168
+
169
+
170
+ def test_ensure_jekyll_disables_livereload() -> None:
171
+ print("render — ensure_jekyll starts the stack with LiveReload off")
172
+ import contextlib
173
+ import io
174
+ import os
175
+ import tempfile
176
+ calls = []
177
+ real_run, real_http_ok, cwd = vea.run, vea.http_ok, os.getcwd()
178
+ with tempfile.TemporaryDirectory() as tmp:
179
+ try:
180
+ os.chdir(tmp)
181
+ vea.http_ok = lambda url, timeout=3.0: bool(calls)
182
+ vea.run = lambda cmd, **kw: calls.append((list(cmd), kw.get("env")))
183
+ with contextlib.redirect_stdout(io.StringIO()):
184
+ started = vea.ensure_jekyll(5)
185
+ finally:
186
+ vea.run, vea.http_ok = real_run, real_http_ok
187
+ os.chdir(cwd)
188
+ up = [c for c in calls if c[0][:3] == ["docker", "compose", "up"]]
189
+ check("we started it", started is True and len(up) == 1)
190
+ check("with JEKYLL_LIVERELOAD=0 in its environment", bool(up) and (up[0][1] or {}).get("JEKYLL_LIVERELOAD") == "0")
191
+ wf = (REPO_ROOT / ".github/workflows/visual-evidence-autogen.yml").read_text(encoding="utf-8")
192
+ check("the workflow also exports JEKYLL_LIVERELOAD: \"0\"", 'JEKYLL_LIVERELOAD: "0"' in wf)
193
+
194
+
144
195
  def test_plan_out_of_scope() -> None:
145
196
  print("plan — nothing visual")
146
197
  plan = plan_for(["docs/systems/x.md", "pages/_posts/2026-09-05-x.md", "_data/backlog.yml"], {})
@@ -387,7 +438,8 @@ def test_workflow_wiring() -> None:
387
438
 
388
439
  def main() -> int:
389
440
  for t in (test_detect_slug, test_plan_pr_454_shape, test_plan_loop_guard_and_budget, test_plan_generic_fallback,
390
- test_plan_respects_author_evidence, test_plan_out_of_scope, test_styling_matches_ci_filter,
441
+ test_plan_respects_author_evidence, test_plan_edited_existing_generator,
442
+ test_ensure_jekyll_disables_livereload, test_plan_out_of_scope, test_styling_matches_ci_filter,
391
443
  test_ui_prefixes_match_gate, test_parse_results, test_parse_results_playwright_158_attachment_names,
392
444
  test_decide, test_stage_and_messages,
393
445
  test_stage_command_output, test_generic_generator_survives_livereload,
@@ -247,10 +247,17 @@ class RealFS:
247
247
 
248
248
  def detect_slug(source: str) -> str | None:
249
249
  """The evidence slug a generator writes to, read from its source."""
250
- m = re.search(r"\bslug:\s*['\"]([A-Za-z0-9._-]+)['\"]", source)
250
+ # Most specific first. A hand-rolled generator can carry per-CASE `slug:`
251
+ # keys (dangling-aria-controls-evidence.mjs: `slug: 'navbar-toggle-fr-about'`)
252
+ # that are file-name prefixes, not the folder; the folder it writes to wins
253
+ # over those, and an explicit `// slug: '…'` comment wins over both.
254
+ m = re.search(r"//\s*slug:\s*['\"]([A-Za-z0-9._-]+)['\"]", source)
251
255
  if m:
252
256
  return m.group(1)
253
257
  m = re.search(r"test/visual/evidence/([A-Za-z0-9._-]+)", source)
258
+ if m:
259
+ return m.group(1)
260
+ m = re.search(r"\bslug:\s*['\"]([A-Za-z0-9._-]+)['\"]", source)
254
261
  return m.group(1) if m else None
255
262
 
256
263
 
@@ -328,15 +335,23 @@ def make_plan(*, changed: list[str], head_sha: str, head_subject: str,
328
335
  gen = by_slug.get(slug)
329
336
  add(slug, "bespoke" if gen else "generic", gen, why)
330
337
 
338
+ changed_dirs = set(evidence_dirs(changed))
331
339
  for gen in changed_generators:
332
340
  slug = detect_slug(fs.read(gen))
333
341
  if not slug:
334
342
  continue
335
343
  folder = f"{EVIDENCE_ROOT}{slug}"
336
- if not has_proof(fs, folder):
337
- add(slug, "bespoke", gen, "changed generator whose evidence folder has no generated proof")
338
-
339
- if ui and not jobs and not evidence_dirs(changed) and not changed_generators and default_slug:
344
+ if folder in changed_dirs:
345
+ continue # the PR touched this folder too; the loop above decided it
346
+ # The generator was edited but its folder was not: whatever proof sits
347
+ # there was rendered by the OLD generator and proves nothing about this
348
+ # PR. (Before, an existing folder with PNGs scheduled nothing at all.)
349
+ why = ("changed generator whose evidence folder has no generated proof"
350
+ if not has_proof(fs, folder)
351
+ else "changed generator; its committed evidence predates the edit")
352
+ add(slug, "bespoke", gen, why)
353
+
354
+ if ui and not jobs and not changed_dirs and default_slug:
340
355
  add(default_slug, "generic", None, "UI paths changed and the PR ships no evidence at all")
341
356
 
342
357
  snapshots_in_scope = bool(styling)
@@ -457,8 +472,12 @@ def ensure_jekyll(timeout: int) -> bool:
457
472
  # `npm ci` would set off a regeneration whose LiveReload reloads every open
458
473
  # page mid-shot (the pr-evidence.mjs crash on #495). Create it first.
459
474
  Path("node_modules").mkdir(exist_ok=True)
460
- log("Starting Jekyll via docker compose…")
461
- run(["docker", "compose", "up", "-d"], capture=False)
475
+ # LiveReload OFF (#461): update-snapshots.sh refuses, in CI, to shoot
476
+ # against a stack that can reload the page ("[update-snapshots] ERROR:
477
+ # LiveReload is live on the snapshot stack"), and it reuses the stack we
478
+ # start here. docker-compose.yml drops --livereload when this is 0.
479
+ log("Starting Jekyll via docker compose (JEKYLL_LIVERELOAD=0)…")
480
+ run(["docker", "compose", "up", "-d"], capture=False, env={"JEKYLL_LIVERELOAD": "0"})
462
481
  log(f"Waiting up to {timeout}s for {HEAD_URL} (cold bundle install + first build)…")
463
482
  deadline = time.time() + timeout
464
483
  while time.time() < deadline:
@@ -97,7 +97,7 @@ ai_client_model() {
97
97
  if [[ -n "${ZER0_AI_MODEL:-}" ]]; then echo "$ZER0_AI_MODEL"; return 0; fi
98
98
  if [[ -n "${SPEC_AI_MODEL:-}" ]]; then echo "$SPEC_AI_MODEL"; return 0; fi
99
99
  case "$p" in
100
- anthropic) echo "${ANTHROPIC_MODEL:-claude-sonnet-5}" ;;
100
+ anthropic) echo "${ANTHROPIC_MODEL:-claude-sonnet-5-5}" ;;
101
101
  claude-cli) echo "${ANTHROPIC_MODEL:-}" ;; # empty → CLI's own default
102
102
  *) echo "${OPENAI_MODEL:-gpt-4o-mini}" ;;
103
103
  esac
data/scripts/lib/audit.sh CHANGED
@@ -46,6 +46,15 @@ manifest_list() {
46
46
  ' "$manifest_file"
47
47
  }
48
48
 
49
+ # manifest_has_key <manifest_file> <key>
50
+ # Succeeds when the manifest declares the top-level key at all, so a list that
51
+ # is deliberately empty is told apart from a snapshot that predates the key.
52
+ manifest_has_key() {
53
+ local manifest_file="$1"
54
+ local key="$2"
55
+ grep -qE "^${key}:" "$manifest_file"
56
+ }
57
+
49
58
  # Read the per-file checksum section from the manifest.
50
59
  # Emits lines of: <relpath> <sha256>
51
60
  manifest_checksums() {
@@ -161,6 +170,76 @@ classify_plugin() {
161
170
  echo "OK"
162
171
  }
163
172
 
173
+ # ---------------------------------------------------------------------------
174
+ # Vendored theme data
175
+ # ---------------------------------------------------------------------------
176
+ # Jekyll 3.10 (GitHub Pages, and the theme's own Gemfile) never loads a theme's
177
+ # _data/, so a consumer reads the theme's data only from its own copy, and that
178
+ # copy does not float with remote_theme. A fix the theme makes to its data
179
+ # (#240 added the `dark` and `contrast` skins) never reaches the sites that
180
+ # vendored the file before it, and nothing reported it (#556).
181
+ #
182
+ # Theme-owned registries a consumer copies verbatim. scripts/bin/manifest
183
+ # publishes this list as `vendored_data_paths`; scripts/bin/audit-consumer falls
184
+ # back to it when the manifest it reads was cut before that key existed.
185
+ # shellcheck disable=SC2034 # read by scripts/bin/manifest and scripts/bin/audit-consumer
186
+ THEME_VENDORED_DATA_PATHS=(
187
+ "_data/theme_skins.yml"
188
+ "_data/theme_backgrounds.yml"
189
+ )
190
+
191
+ # classify_vendored_data <theme_root> <consumer_root> <relpath> <override_paths_file>
192
+ # Emits one of: IDENTICAL STALE DIFFERS_JUSTIFIED MISSING, or nothing when the
193
+ # theme checkout does not ship the file (an older theme has nothing to compare).
194
+ classify_vendored_data() {
195
+ local theme_root="$1"
196
+ local consumer_root="$2"
197
+ local relpath="$3"
198
+ local override_paths_file="$4"
199
+
200
+ [[ -f "$theme_root/$relpath" ]] || return 0
201
+
202
+ case "$(classify_file "$theme_root" "$consumer_root" "$relpath" "$override_paths_file")" in
203
+ IDENTICAL) echo "IDENTICAL" ;;
204
+ DIFFERS_JUSTIFIED) echo "DIFFERS_JUSTIFIED" ;;
205
+ DIFFERS_UNJUSTIFIED) echo "STALE" ;;
206
+ MISSING_LOCALLY) echo "MISSING" ;;
207
+ esac
208
+ }
209
+
210
+ # missing_data_keys <theme_yml> <consumer_yml>
211
+ # Prints, one per line, every key the theme's `en:` block has that the
212
+ # consumer's `en:` block lacks (the top-level keys, for a file without an `en:`
213
+ # block). A consumer customises the VALUES in these files, so bytes are not
214
+ # compared; a key it lacks is a label the theme reads and the site never got.
215
+ # Returns 2 when ruby is unavailable, 1 when either file does not parse.
216
+ missing_data_keys() {
217
+ local theme_yml="$1"
218
+ local consumer_yml="$2"
219
+
220
+ command -v ruby >/dev/null 2>&1 || return 2
221
+
222
+ # Runs on Ruby 2.6: its Psych 3.1 already takes these keywords. `aliases`
223
+ # is needed because ui-text.yml builds its regional blocks from &DEFAULT_EN.
224
+ ruby -ryaml -rdate -e '
225
+ def load_yaml(path)
226
+ YAML.safe_load(File.read(path), permitted_classes: [Date, Time], aliases: true)
227
+ end
228
+ begin
229
+ theme = load_yaml(ARGV[0])
230
+ consumer = load_yaml(ARGV[1])
231
+ rescue Psych::Exception, SystemCallError => e
232
+ abort e.message
233
+ end
234
+ abort "#{ARGV[0]}: not a YAML mapping" unless theme.is_a?(Hash)
235
+ scoped = theme["en"].is_a?(Hash)
236
+ want = scoped ? theme["en"] : theme
237
+ have = consumer.is_a?(Hash) ? (scoped ? consumer["en"] : consumer) : nil
238
+ have = {} unless have.is_a?(Hash)
239
+ (want.keys.map(&:to_s) - have.keys.map(&:to_s)).each { |key| puts key }
240
+ ' "$theme_yml" "$consumer_yml"
241
+ }
242
+
164
243
  # ---------------------------------------------------------------------------
165
244
  # Theme-path auto-resolution
166
245
  # ---------------------------------------------------------------------------
@@ -293,6 +372,18 @@ print_classification() {
293
372
  local color="${CYAN}"
294
373
  local icon="?"
295
374
  ;;
375
+ STALE)
376
+ local color="${RED}"
377
+ local icon="✗"
378
+ ;;
379
+ MISSING)
380
+ local color="${YELLOW}"
381
+ local icon="?"
382
+ ;;
383
+ MISSING_KEYS)
384
+ local color="${YELLOW}"
385
+ local icon="!"
386
+ ;;
296
387
  *)
297
388
  local color="${NC}"
298
389
  local icon="?"
@@ -322,3 +413,68 @@ print_classification() {
322
413
  echo -e "${color}[$classification]${NC} $relpath"
323
414
  fi
324
415
  }
416
+
417
+ # json_escape <string> — escape backslashes and double quotes for a JSON string.
418
+ json_escape() {
419
+ local s="$1"
420
+ s="${s//\\/\\\\}"
421
+ s="${s//\"/\\\"}"
422
+ printf '%s' "$s"
423
+ }
424
+
425
+ # print_data_classification <classification> <relpath> <format> [missing_keys]
426
+ # Text and github output for the vendored-data pass. missing_keys is the
427
+ # newline-separated list missing_data_keys printed. (--format json collects
428
+ # these into the report's separate "vendored_data" array instead: for data,
429
+ # IDENTICAL means "current, keep it", never the themable "safe to delete".)
430
+ print_data_classification() {
431
+ local classification="$1"
432
+ local relpath="$2"
433
+ local format="${3:-text}"
434
+ local keys="${4:-}"
435
+ local count=0 list=""
436
+
437
+ if [[ -n "$keys" ]]; then
438
+ count=$(printf '%s\n' "$keys" | wc -l | tr -d ' ')
439
+ list=$(printf '%s\n' "$keys" | paste -s -d ',' - | sed 's/,/, /g')
440
+ fi
441
+
442
+ if [[ "$format" == "github" ]]; then
443
+ case "$classification" in
444
+ STALE)
445
+ echo "::warning file=$relpath::STALE vendored theme data: differs from the theme and is not declared in .theme-overrides.yml (refresh it with audit-consumer --fix)" ;;
446
+ MISSING)
447
+ echo "::notice file=$relpath::MISSING: this site has no copy, so the theme's includes fall back to built-in defaults" ;;
448
+ MISSING_KEYS)
449
+ echo "::warning file=$relpath::MISSING_KEYS ($count): $list" ;;
450
+ esac
451
+ return 0
452
+ fi
453
+
454
+ print_classification "$classification" "$relpath" "$format"
455
+ if [[ "$classification" == "MISSING_KEYS" ]]; then
456
+ echo " $count key(s) absent from en: $list"
457
+ fi
458
+ return 0
459
+ }
460
+
461
+ # data_json_entry <classification> <relpath> [missing_keys]
462
+ # One object of the JSON report's "vendored_data" array.
463
+ data_json_entry() {
464
+ local classification="$1"
465
+ local relpath="$2"
466
+ local keys="${3:-}"
467
+ local entry key sep=""
468
+
469
+ entry="{\"path\":\"$(json_escape "$relpath")\",\"status\":\"$classification\""
470
+ if [[ -n "$keys" ]]; then
471
+ entry+=',"missing_keys":['
472
+ while IFS= read -r key; do
473
+ [[ -n "$key" ]] || continue
474
+ entry+="${sep}\"$(json_escape "$key")\""
475
+ sep=","
476
+ done <<< "$keys"
477
+ entry+=']'
478
+ fi
479
+ printf '%s}' "$entry"
480
+ }
@@ -135,7 +135,7 @@ OAUTH_BETA = "oauth-2025-04-20"
135
135
  # Claude Code OAuth tokens require the FIRST system block to identify as Claude
136
136
  # Code, otherwise the API rejects the call with a misleading `rate_limit_error`.
137
137
  CLAUDE_CODE_SYSTEM_PROMPT = "You are Claude Code, Anthropic's official CLI for Claude."
138
- DEFAULT_CLAUDE_MODEL = "claude-opus-4-8"
138
+ DEFAULT_CLAUDE_MODEL = "claude-opus-5-5"
139
139
  CLAUDE_MAX_TOKENS = 16000 # non-streaming ceiling; SVG banners fit comfortably
140
140
 
141
141
  # Model-name prefix → provider family. Used to ignore a configured/author model
data/scripts/translate.rb CHANGED
@@ -104,7 +104,7 @@ module Zer0Translate
104
104
  "source_lang" => "en",
105
105
  "languages" => [],
106
106
  "provider" => "claude",
107
- "model" => "claude-opus-4-8",
107
+ "model" => "claude-opus-5-5",
108
108
  "max_tokens" => 8192,
109
109
  "max_chunk_chars" => 4000,
110
110
  "max_chunk_segments" => 60,
@@ -12,7 +12,10 @@
12
12
  # - _data/features.yml (the single registry) is missing
13
13
  # - the header is missing a `# Last Updated:` line
14
14
  # - schema violations (missing required field, bad id/version, duplicate id)
15
- # - implemented:false without `removed_in:`
15
+ # - implemented:false without `removed_in:`, unless the entry is
16
+ # `status: planned` (requested, not yet built — UPS-WORK-15)
17
+ # - `status:` outside the fleet set (shipped partial planned deprecated tbd)
18
+ # - `status: planned` combined with `implemented: true` or `removed_in:`
16
19
  # - a reference path on an ACTIVE feature does not exist in the repo
17
20
  # - missing/malformed `provenance:` block on an active feature (since PR B)
18
21
  # - missing/unresolvable `tests:` linkage on an active feature (since PR C):
@@ -30,6 +33,8 @@ require 'yaml'
30
33
 
31
34
  MIRROR = '_data/features.yml'
32
35
  REQUIRED = %w[id title description implemented version link docs tags date].freeze
36
+ # The fleet's catalog statuses (UPS-WORK-15; hub tools/governance_lint.py STATUSES).
37
+ STATUSES = %w[shipped partial planned deprecated tbd].freeze
33
38
  STRICT = ENV['FEATURES_STRICT'] == '1'
34
39
 
35
40
  def die(msg)
@@ -91,6 +96,17 @@ feats.each_with_index do |f, i|
91
96
  die "#{id}: version must be X.Y.Z" unless f['version'].to_s =~ /\A\d+\.\d+\.\d+/
92
97
  die "#{id}: tags must be a non-empty list" unless f['tags'].is_a?(Array) && !f['tags'].empty?
93
98
 
99
+ status = f['status']
100
+ die "#{id}: status must be one of #{STATUSES.join(' ')}" if status && !STATUSES.include?(status)
101
+
102
+ if status == 'planned'
103
+ # Planned features are requested but not built: no code, provenance or
104
+ # tests yet, and nothing was removed. They must not claim either state.
105
+ die "#{id}: status:planned requires implemented:false" unless f['implemented'] == false
106
+ die "#{id}: status:planned contradicts `removed_in:` (use status: deprecated for a removed feature)" if f['removed_in']
107
+ next
108
+ end
109
+
94
110
  if f['implemented'] == false
95
111
  # Removed features keep their (now-absent) references for history but must
96
112
  # record when they went away.
@@ -143,4 +159,6 @@ unless warnings.empty?
143
159
  end
144
160
 
145
161
  active = feats.count { |f| f['implemented'] != false }
146
- puts "Feature registry valid: #{feats.length} entries (#{active} active), refs resolved, _data registry (single copy)"
162
+ planned = feats.count { |f| f['status'] == 'planned' }
163
+ summary = planned.zero? ? "#{active} active" : "#{active} active, #{planned} planned"
164
+ puts "Feature registry valid: #{feats.length} entries (#{summary}), refs resolved, _data registry (single copy)"
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: 1.31.2
4
+ version: 1.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-18 00:00:00.000000000 Z
11
+ date: 2026-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -146,6 +146,7 @@ files:
146
146
  - _includes/components/component-showcase.html
147
147
  - _includes/components/config-editor.html
148
148
  - _includes/components/config-viewer.html
149
+ - _includes/components/cookie-consent-needed.html
149
150
  - _includes/components/cookie-consent.html
150
151
  - _includes/components/cta-button.html
151
152
  - _includes/components/data-card.html
@@ -199,6 +200,7 @@ files:
199
200
  - _includes/components/translation-notice.html
200
201
  - _includes/components/zer0-env-var.html
201
202
  - _includes/content/backlinks.html
203
+ - _includes/content/comments.html
202
204
  - _includes/content/giscus.html
203
205
  - _includes/content/intro.html
204
206
  - _includes/content/jsonld-faq.html
@@ -321,6 +323,7 @@ files:
321
323
  - _sass/core/_variables.scss
322
324
  - _sass/core/code-copy.scss
323
325
  - _sass/custom.scss
326
+ - _sass/layouts/_admin.scss
324
327
  - _sass/layouts/_global-chrome.scss
325
328
  - _sass/layouts/_landing.scss
326
329
  - _sass/layouts/_navbar-extras.scss