bookshop
bookshop copied to clipboard
[HUGO] `bookshop_partial` guard prevents sending empty partial props
https://github.com/CloudCannon/bookshop/blob/de4a9726962d19de01612a809c979c40038717c7/hugo/v3/core/bookshop_partial.html#L40
Given a content file of:
---
canvas_layers: []
---
and a shared component with a wrapping div and javascript components (alpine in this example):
{{/* templates/component-library/shared/hugo/canvas.hugo.html */}}
<div class="w-full h-full" x-data="canvas()">
{{ partial "bookshop" . }}
</div>
When using {{ partial "bookshop_partial" (slice "canvas" .Params.canvas_layers) }}
the wrapping div is never output.