Spec:specs/rendering.allium rule ExpandBuiltinMacros: each macro "renders a bundled macro template (macros/{name}) in an isolated Liquid subscope" (invariant MacroIsolation). Macros: youtube, vimeo, gallery, photo_archive (template macros/photo-archive), tag_cloud (macros/tag-cloud).
bDS2: ships ../bDS2/priv/starter_templates/templates/macros/{youtube,vimeo,gallery,photo-archive,tag-cloud}.liquid and renders them via the Liquid engine.
Current behaviour (RuDS):crates/bds-core/src/render/macros.rs builds the HTML in Rust format! strings; assets/starter-templates/ has no macros/ directory. Consequences: (a) output HTML parity with bDS2 is unverified, (b) no template-based override/customization path, (c) at least one hardcoded English string ("Missing Vimeo video id." in render_vimeo) violating i18n rules.
Task:
Copy the five bDS2 macro liquid templates into assets/starter-templates/macros/ (bring assets into the project, no CDN refs).
Render macros through the existing Liquid renderer in an isolated scope (macro-local assigns must not leak — spec MacroIsolation), keeping the current param handling/clamps (gallery columns 1..6 default 3, tag_cloud width 320..1600 def 900 / height 180..900 def 420, orientation aliases, photo_archive year/month filter) which already match spec.
Compare rendered output against bDS2 for a fixture post using each macro; differences must be resolved toward bDS2.
Replace hardcoded English fallbacks with render domain translations (locales/render/*.ftl).
Acceptance: Macro HTML matches bDS2 output for fixtures; macro templates live as assets; i18n clean; existing macro tests updated.
**Source:** Audit section 1.4 (high impact).
**Spec:** `specs/rendering.allium` rule ExpandBuiltinMacros: each macro "renders a bundled macro template (macros/{name}) in an isolated Liquid subscope" (invariant MacroIsolation). Macros: youtube, vimeo, gallery, photo_archive (template macros/photo-archive), tag_cloud (macros/tag-cloud).
**bDS2:** ships `../bDS2/priv/starter_templates/templates/macros/{youtube,vimeo,gallery,photo-archive,tag-cloud}.liquid` and renders them via the Liquid engine.
**Current behaviour (RuDS):** `crates/bds-core/src/render/macros.rs` builds the HTML in Rust format! strings; `assets/starter-templates/` has no macros/ directory. Consequences: (a) output HTML parity with bDS2 is unverified, (b) no template-based override/customization path, (c) at least one hardcoded English string ("Missing Vimeo video id." in `render_vimeo`) violating i18n rules.
**Task:**
1. Copy the five bDS2 macro liquid templates into `assets/starter-templates/macros/` (bring assets into the project, no CDN refs).
2. Render macros through the existing Liquid renderer in an isolated scope (macro-local assigns must not leak — spec MacroIsolation), keeping the current param handling/clamps (gallery columns 1..6 default 3, tag_cloud width 320..1600 def 900 / height 180..900 def 420, orientation aliases, photo_archive year/month filter) which already match spec.
3. Compare rendered output against bDS2 for a fixture post using each macro; differences must be resolved toward bDS2.
4. Replace hardcoded English fallbacks with `render` domain translations (locales/render/*.ftl).
**Acceptance:** Macro HTML matches bDS2 output for fixtures; macro templates live as assets; i18n clean; existing macro tests updated.
hugo
added the bug label 2026-07-20 19:43:56 +00:00
Implemented in 8170076. Added the five bundled macro Liquid templates and routed every built-in macro through isolated Liquid assigns with bDS2-compatible HTML, data shaping, URI encoding, and localized defaults/empty states. Project partial templates with macros/* slugs now override the bundled defaults. Preserved gallery and tag-cloud bounds, orientation aliases, photo-archive filters, published tag weights, and colours. Verified with bDS2 fixture parity tests, isolated-scope and override integration tests, supported-Liquid validation, cargo fmt, clippy with warnings denied, cargo build --workspace, cargo test --workspace, and Allium check/analyse with no errors or findings.
Implemented in 8170076. Added the five bundled macro Liquid templates and routed every built-in macro through isolated Liquid assigns with bDS2-compatible HTML, data shaping, URI encoding, and localized defaults/empty states. Project partial templates with macros/* slugs now override the bundled defaults. Preserved gallery and tag-cloud bounds, orientation aliases, photo-archive filters, published tag weights, and colours. Verified with bDS2 fixture parity tests, isolated-scope and override integration tests, supported-Liquid validation, cargo fmt, clippy with warnings denied, cargo build --workspace, cargo test --workspace, and Allium check/analyse with no errors or findings.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Source: Audit section 1.4 (high impact).
Spec:
specs/rendering.alliumrule ExpandBuiltinMacros: each macro "renders a bundled macro template (macros/{name}) in an isolated Liquid subscope" (invariant MacroIsolation). Macros: youtube, vimeo, gallery, photo_archive (template macros/photo-archive), tag_cloud (macros/tag-cloud).bDS2: ships
../bDS2/priv/starter_templates/templates/macros/{youtube,vimeo,gallery,photo-archive,tag-cloud}.liquidand renders them via the Liquid engine.Current behaviour (RuDS):
crates/bds-core/src/render/macros.rsbuilds the HTML in Rust format! strings;assets/starter-templates/has no macros/ directory. Consequences: (a) output HTML parity with bDS2 is unverified, (b) no template-based override/customization path, (c) at least one hardcoded English string ("Missing Vimeo video id." inrender_vimeo) violating i18n rules.Task:
assets/starter-templates/macros/(bring assets into the project, no CDN refs).renderdomain translations (locales/render/*.ftl).Acceptance: Macro HTML matches bDS2 output for fixtures; macro templates live as assets; i18n clean; existing macro tests updated.
Implemented in
8170076. Added the five bundled macro Liquid templates and routed every built-in macro through isolated Liquid assigns with bDS2-compatible HTML, data shaping, URI encoding, and localized defaults/empty states. Project partial templates with macros/* slugs now override the bundled defaults. Preserved gallery and tag-cloud bounds, orientation aliases, photo-archive filters, published tag weights, and colours. Verified with bDS2 fixture parity tests, isolated-scope and override integration tests, supported-Liquid validation, cargo fmt, clippy with warnings denied, cargo build --workspace, cargo test --workspace, and Allium check/analyse with no errors or findings.