mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 18:15:31 +00:00
Replace manual format detection (printf "%T", MediaType.SubType whitelists, duck-typing) with Hugo's new reflect.IsResource, reflect.IsImageResource, and reflect.IsImageResourceProcessable functions across 19 template files. Key changes: - process_responsive_image: collapse 15-line format whitelist into single reflect.IsImageResourceProcessable call - Unify three-way SVG/processable/GIF branches into two-way $canProcess guard - Remove duplicate GIF passthrough branches in single.html, events/page.html - Add missing SVG guard in research-areas block (was calling .Fill unprotected) - Replace nil checks with reflect.IsResource in get_cover_image/get_featured_image Design decision: GIFs are intentionally excluded from processing despite Hugo supporting it — processing strips animation frames, so we preserve user-optimized animated GIFs by checking (IsImageResourceProcessable AND not GIF).