mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
style(widgets): default
no pipes required
This commit is contained in:
parent
fe72738d8f
commit
ee4a7b483b
@ -4,8 +4,8 @@
|
||||
<aside class="sidebar right-sidebar sticky">
|
||||
{{ range $widget := . }}
|
||||
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
|
||||
<!-- Ensure that the params always exist -->
|
||||
{{- $params := .params | default (dict) -}}
|
||||
<!-- Ensure that the `params` is not nil -->
|
||||
{{- $params := default dict .params -}}
|
||||
|
||||
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" $params) }}
|
||||
{{ else }}
|
||||
|
Loading…
Reference in New Issue
Block a user