jekyll-theme-zer0 1.31.3 → 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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +131 -0
  3. data/_data/backlog.yml +97 -28
  4. data/_data/features.yml +164 -15
  5. data/_data/navigation/admin.yml +26 -8
  6. data/_data/navigation/docs.yml +2 -8
  7. data/_data/theme-manifest.yml +63 -47
  8. data/_data/ui-text.yml +9 -0
  9. data/_includes/README.md +2 -1
  10. data/_includes/components/ai-chat.html +2 -2
  11. data/_includes/components/author-bio.html +3 -1
  12. data/_includes/components/author-card.html +9 -9
  13. data/_includes/components/author-eeat.html +13 -3
  14. data/_includes/components/collection-manager.html +2 -2
  15. data/_includes/components/component-showcase.html +7 -7
  16. data/_includes/components/cookie-consent-needed.html +37 -0
  17. data/_includes/components/cookie-consent.html +15 -5
  18. data/_includes/components/page-feedback.html +9 -5
  19. data/_includes/components/post-card.html +2 -2
  20. data/_includes/components/theme-customizer.html +1 -1
  21. data/_includes/content/comments.html +46 -0
  22. data/_includes/content/giscus.html +22 -13
  23. data/_includes/content/intro.html +17 -1
  24. data/_includes/content/jsonld-software.html +4 -9
  25. data/_includes/core/footer.html +36 -14
  26. data/_includes/navigation/admin-nav.html +110 -63
  27. data/_includes/navigation/section-sidebar.html +20 -20
  28. data/_includes/navigation/sidebar-config.html +17 -8
  29. data/_includes/navigation/sidebar-right.html +16 -2
  30. data/_layouts/README.md +1 -1
  31. data/_layouts/admin.html +49 -20
  32. data/_layouts/article.html +10 -10
  33. data/_layouts/book-story.html +3 -7
  34. data/_layouts/default.html +55 -1
  35. data/_layouts/news.html +8 -7
  36. data/_layouts/note.html +2 -6
  37. data/_layouts/notebook.html +2 -6
  38. data/_layouts/recipe.html +3 -7
  39. data/_layouts/root.html +7 -4
  40. data/_layouts/section.html +43 -42
  41. data/_sass/components/_page-feedback.scss +1 -1
  42. data/_sass/components/_ui-enhancements.scss +22 -0
  43. data/_sass/core/_nav-tree.scss +10 -2
  44. data/_sass/core/_navbar.scss +19 -5
  45. data/_sass/core/_obsidian.scss +19 -3
  46. data/_sass/core/_sidebar-categories.scss +4 -2
  47. data/_sass/core/_sidebar-extras.scss +3 -2
  48. data/_sass/layouts/_admin.scss +60 -0
  49. data/_sass/layouts/_navbar-extras.scss +7 -2
  50. data/_sass/theme/_skins.scss +124 -32
  51. data/_sass/tokens/_color.scss +3 -0
  52. data/_sass/tokens/_layers.scss +12 -5
  53. data/assets/css/main.scss +1 -0
  54. data/assets/js/code-copy.js +30 -2
  55. data/assets/js/setup-wizard.js +2 -2
  56. data/assets/js/ui-enhancements.js +46 -0
  57. data/scripts/ai/README.md +1 -1
  58. data/scripts/bin/audit-consumer +155 -8
  59. data/scripts/bin/manifest +27 -8
  60. data/scripts/bin/validate +3 -2
  61. data/scripts/lib/audit.sh +156 -0
  62. data/scripts/validate-features.rb +20 -2
  63. metadata +5 -2
@@ -6,6 +6,7 @@
6
6
  # --theme-path <dir> Explicit theme path (auto-resolved if omitted)
7
7
  # --mode {gem|remote_theme} Deployment mode (auto-detected if omitted)
8
8
  # --fix Delete IDENTICAL files + copy MISSING/STALE plugins
9
+ # + refresh STALE/MISSING vendored _data
9
10
  # --overwrite-plugins Combined with --fix: replace STALE plugins too
10
11
  # --strict Exit non-zero on any unjustified drift (for CI)
11
12
  # --format {text|json|github} Output format (default: text)
@@ -52,17 +53,44 @@ DESCRIPTION:
52
53
  OK Plugin matches current theme version
53
54
  NOT_REQUIRED Gem mode — theme loads plugins itself
54
55
 
56
+ Vendored data classifications (both modes):
57
+ Jekyll 3.10 (GitHub Pages) never loads a theme's _data/, so a site
58
+ reads the theme's data only from its own copy, and that copy does NOT
59
+ float with remote_theme. Re-run the audit after every theme update.
60
+
61
+ Theme-owned registries you copy verbatim (manifest vendored_data_paths:
62
+ _data/theme_skins.yml, _data/theme_backgrounds.yml):
63
+ IDENTICAL Your copy matches the theme → current, keep it
64
+ STALE Your copy differs and is NOT listed in
65
+ .theme-overrides.yml → --fix refreshes it from the
66
+ theme; counts toward --strict
67
+ DIFFERS_JUSTIFIED Your copy differs and is listed → intentional
68
+ MISSING No copy → informational (the theme's includes fall
69
+ back to built-in defaults); --fix copies it
70
+
71
+ Data you customise (YAML files in manifest theme_data_paths, i.e.
72
+ _data/ui-text.yml): only keys are compared, never values.
73
+ MISSING_KEYS Keys the theme's en: block has that yours lacks
74
+ → warn-only, never fails --strict; add them by hand
75
+ (--fix never edits a file you customise)
76
+ OK Every key is present
77
+ MISSING No copy → informational
78
+
55
79
  OPTIONS:
56
80
  --consumer-path <dir> Consumer repo root (default: current directory)
57
81
  --theme-path <dir> Explicit theme path (auto-resolved if omitted)
58
82
  --mode {gem|remote_theme} Force deployment mode (auto-detected if omitted)
59
83
  --fix Fix issues: delete IDENTICAL files; copy
60
- MISSING_PLUGIN files from theme
84
+ MISSING_PLUGIN files from theme; refresh
85
+ STALE and MISSING vendored data from theme
61
86
  --overwrite-plugins With --fix: also replace STALE_PLUGIN files
62
- --strict Exit 1 if any DIFFERS_UNJUSTIFIED or
63
- MISSING_PLUGIN issues found (use in CI)
87
+ --strict Exit 1 if any DIFFERS_UNJUSTIFIED,
88
+ MISSING_PLUGIN or STALE vendored data
89
+ issues found (use in CI)
64
90
  --format {text|json|github} Output format
65
- github emits ::warning annotations for CI
91
+ github emits ::warning annotations for CI;
92
+ json reports vendored data in its own
93
+ "vendored_data" array beside "results"
66
94
  --verbose Show debug output
67
95
  --dry-run Show what --fix would do without changing files
68
96
  --help, -h Show this help
@@ -83,6 +111,9 @@ EXAMPLES:
83
111
 
84
112
  # Fix including stale plugins
85
113
  ./scripts/bin/audit-consumer --fix --overwrite-plugins
114
+
115
+ # After a theme update: refresh vendored _data that fell behind
116
+ ./scripts/bin/audit-consumer --consumer-path ~/github/lifehacker.dev --fix --dry-run
86
117
  EOF
87
118
  }
88
119
 
@@ -175,7 +206,8 @@ fi
175
206
  OVERRIDES_FILE="$CONSUMER_ROOT/.theme-overrides.yml"
176
207
  [[ -f "$OVERRIDES_FILE" ]] || OVERRIDES_FILE="$CONSUMER_PATH/.theme-overrides.yml"
177
208
  OVERRIDE_PATHS_TMP=$(mktemp)
178
- trap 'rm -f "$OVERRIDE_PATHS_TMP"' EXIT
209
+ KEYS_ERR_TMP=$(mktemp)
210
+ trap 'rm -f "$OVERRIDE_PATHS_TMP" "$KEYS_ERR_TMP"' EXIT
179
211
 
180
212
  if [[ -f "$OVERRIDES_FILE" ]]; then
181
213
  info "Override manifest: $OVERRIDES_FILE"
@@ -224,6 +256,26 @@ if [[ ${#REQUIRED_PLUGIN_FILES[@]} -eq 0 && ${#OPTIONAL_PLUGIN_FILES[@]} -eq 0 ]
224
256
  )
225
257
  fi
226
258
 
259
+ # Data the theme ships but cannot deliver (see "Scan vendored theme data").
260
+ # A manifest snapshot cut before `vendored_data_paths` existed (1.31.x and
261
+ # older) lacks the key, so fall back to the list scripts/lib/audit.sh keeps.
262
+ VENDORED_DATA_FILES=()
263
+ THEME_DATA_FILES=()
264
+ if [[ -n "$MANIFEST" ]] && manifest_has_key "$MANIFEST" "vendored_data_paths"; then
265
+ while IFS= read -r line; do
266
+ [[ -n "$line" ]] && VENDORED_DATA_FILES+=("$line")
267
+ done < <(manifest_list "$MANIFEST" "vendored_data_paths")
268
+ else
269
+ VENDORED_DATA_FILES=("${THEME_VENDORED_DATA_PATHS[@]}")
270
+ fi
271
+ if [[ -n "$MANIFEST" ]] && manifest_has_key "$MANIFEST" "theme_data_paths"; then
272
+ while IFS= read -r line; do
273
+ [[ -n "$line" ]] && THEME_DATA_FILES+=("$line")
274
+ done < <(manifest_list "$MANIFEST" "theme_data_paths")
275
+ else
276
+ THEME_DATA_FILES=("_data/ui-text.yml")
277
+ fi
278
+
227
279
  # ---------------------------------------------------------------------------
228
280
  # Scan themable directories
229
281
  # ---------------------------------------------------------------------------
@@ -301,6 +353,73 @@ if [[ ${#ALL_PLUGIN_FILES[@]} -gt 0 ]]; then
301
353
  done
302
354
  fi
303
355
 
356
+ # ---------------------------------------------------------------------------
357
+ # Scan vendored theme data
358
+ # ---------------------------------------------------------------------------
359
+ # Jekyll 3.10, which GitHub Pages and the github-pages gem run, never loads a
360
+ # theme's _data/ in either mode, so every consumer keeps its own copy of the
361
+ # theme's data, and the floating remote_theme never updates it: a copy freezes
362
+ # on the day it was made (#556). The pass runs in both modes.
363
+ STALE_DATA_FILES=()
364
+ MISSING_DATA_FILES=()
365
+ DATA_JSON_ENTRIES=()
366
+ DATA_STALE_COUNT=0
367
+ DATA_MISSING_COUNT=0
368
+ DATA_MISSING_KEYS_COUNT=0
369
+
370
+ # report_data <classification> <relpath> [missing_keys]
371
+ report_data() {
372
+ if [[ "$FORMAT" == "json" ]]; then
373
+ DATA_JSON_ENTRIES+=("$(data_json_entry "$1" "$2" "${3:-}")")
374
+ else
375
+ print_data_classification "$1" "$2" "$FORMAT" "${3:-}"
376
+ fi
377
+ }
378
+
379
+ [[ "$FORMAT" == "text" ]] && echo ""
380
+ [[ "$FORMAT" == "text" ]] && info "--- Vendored theme data (does not float with remote_theme) ---"
381
+
382
+ for data_rel in ${VENDORED_DATA_FILES[@]+"${VENDORED_DATA_FILES[@]}"}; do
383
+ classification=$(classify_vendored_data "$RESOLVED_THEME" "$CONSUMER_PATH" "$data_rel" "$OVERRIDE_PATHS_TMP")
384
+ [[ -n "$classification" ]] || continue # this theme checkout does not ship it
385
+ report_data "$classification" "$data_rel"
386
+ case "$classification" in
387
+ STALE)
388
+ STALE_DATA_FILES+=("$data_rel")
389
+ DATA_STALE_COUNT=$((DATA_STALE_COUNT + 1)) ;;
390
+ MISSING)
391
+ MISSING_DATA_FILES+=("$data_rel")
392
+ DATA_MISSING_COUNT=$((DATA_MISSING_COUNT + 1)) ;;
393
+ esac
394
+ done
395
+
396
+ for data_rel in ${THEME_DATA_FILES[@]+"${THEME_DATA_FILES[@]}"}; do
397
+ # Only a YAML file has keys to compare. A directory such as _data/navigation
398
+ # is the consumer's own content end to end.
399
+ [[ -f "$RESOLVED_THEME/$data_rel" ]] || continue
400
+ case "$data_rel" in
401
+ *.yml|*.yaml) ;;
402
+ *) continue ;;
403
+ esac
404
+ if [[ ! -f "$CONSUMER_PATH/$data_rel" ]]; then
405
+ report_data "MISSING" "$data_rel"
406
+ continue
407
+ fi
408
+
409
+ keys_status=0
410
+ missing_keys=$(missing_data_keys "$RESOLVED_THEME/$data_rel" "$CONSUMER_PATH/$data_rel" 2>"$KEYS_ERR_TMP") || keys_status=$?
411
+ if [[ "$keys_status" -eq 2 ]]; then
412
+ warn "ruby not found: skipped the key check of $data_rel"
413
+ elif [[ "$keys_status" -ne 0 ]]; then
414
+ warn "Could not compare the keys of $data_rel: $(head -n 1 "$KEYS_ERR_TMP")"
415
+ elif [[ -n "$missing_keys" ]]; then
416
+ DATA_MISSING_KEYS_COUNT=$((DATA_MISSING_KEYS_COUNT + $(printf '%s\n' "$missing_keys" | wc -l)))
417
+ report_data "MISSING_KEYS" "$data_rel" "$missing_keys"
418
+ else
419
+ report_data "OK" "$data_rel"
420
+ fi
421
+ done
422
+
304
423
  # ---------------------------------------------------------------------------
305
424
  # Apply fixes
306
425
  # ---------------------------------------------------------------------------
@@ -341,14 +460,36 @@ if [[ "$FIX" == "true" ]]; then
341
460
  fi
342
461
  fi
343
462
  done
463
+
464
+ # Vendored data is the theme's to own: take its copy. A file declared in
465
+ # .theme-overrides.yml is DIFFERS_JUSTIFIED and never listed here, and a
466
+ # file the consumer customises (ui-text.yml) is never written.
467
+ for data_rel in ${STALE_DATA_FILES[@]+"${STALE_DATA_FILES[@]}"} ${MISSING_DATA_FILES[@]+"${MISSING_DATA_FILES[@]}"}; do
468
+ if [[ "$DRY_RUN" == "true" ]]; then
469
+ info "[DRY RUN] Would refresh vendored data from the theme: $data_rel"
470
+ else
471
+ mkdir -p "$(dirname "$CONSUMER_PATH/$data_rel")"
472
+ cp "$RESOLVED_THEME/$data_rel" "$CONSUMER_PATH/$data_rel"
473
+ success "Refreshed vendored data from the theme: $data_rel"
474
+ fi
475
+ done
344
476
  fi
345
477
 
346
478
  # ---------------------------------------------------------------------------
347
479
  # Summary
348
480
  # ---------------------------------------------------------------------------
349
481
  # Entries are printed without a trailing newline (see print_classification),
350
- # so close the array on its own line.
351
- [[ "$FORMAT" == "json" ]] && printf '\n]}\n'
482
+ # so close each array on its own line. Vendored data gets its own array: for
483
+ # data, IDENTICAL means "current, keep it", not the themable "safe to delete".
484
+ if [[ "$FORMAT" == "json" ]]; then
485
+ printf '\n],"vendored_data":['
486
+ data_sep=""
487
+ for data_entry in ${DATA_JSON_ENTRIES[@]+"${DATA_JSON_ENTRIES[@]}"}; do
488
+ printf '%s\n %s' "$data_sep" "$data_entry"
489
+ data_sep=","
490
+ done
491
+ printf '\n]}\n'
492
+ fi
352
493
 
353
494
  if [[ "$FORMAT" == "text" ]]; then
354
495
  echo ""
@@ -357,9 +498,15 @@ if [[ "$FORMAT" == "text" ]]; then
357
498
  info "DIFFERS_UNJUSTIFIED files: ${#DIFFERS_UNJUSTIFIED_FILES[@]}"
358
499
  info "Required plugin issues: $PLUGIN_ISSUES"
359
500
  [[ "$OPTIONAL_PLUGIN_ISSUES" -gt 0 ]] && info "Optional plugins not vendored: $OPTIONAL_PLUGIN_ISSUES (informational)"
501
+ info "STALE vendored data files: $DATA_STALE_COUNT (refresh with --fix)"
502
+ [[ "$DATA_MISSING_COUNT" -gt 0 ]] && info "MISSING vendored data files: $DATA_MISSING_COUNT (informational; --fix copies them)"
503
+ [[ "$DATA_MISSING_KEYS_COUNT" -gt 0 ]] && info "Data keys missing (warn-only): $DATA_MISSING_KEYS_COUNT"
360
504
  fi
361
505
 
362
- TOTAL_ISSUES=$((DRIFT_COUNT + PLUGIN_ISSUES))
506
+ # STALE vendored data is unjustified drift like DIFFERS_UNJUSTIFIED. MISSING
507
+ # data and MISSING_KEYS are warn-only: the theme's includes degrade to
508
+ # built-in defaults, so neither fails --strict.
509
+ TOTAL_ISSUES=$((DRIFT_COUNT + PLUGIN_ISSUES + DATA_STALE_COUNT))
363
510
 
364
511
  if [[ "$STRICT" == "true" && "$TOTAL_ISSUES" -gt 0 ]]; then
365
512
  error "Strict mode: $TOTAL_ISSUES unjustified drift issue(s) found."
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|
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
+ }
@@ -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.3
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-20 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