hugo-theme-stack-stars/layouts/partials/sidebar/right.html

16 lines
650 B
HTML
Raw Normal View History

{{- $scope := default "homepage" .Scope -}}
{{- $context := .Context -}}
{{- with (index .Context.Site.Params.widgets $scope) -}}
2020-08-22 11:20:08 +00:00
<aside class="sidebar right-sidebar sticky">
{{ range $widget := . }}
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
<!-- Ensure that the `params` is not nil -->
{{- $params := default dict .params -}}
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" $params) }}
{{ else }}
{{ warnf "Widget %s not found" .type }}
{{ end }}
2020-08-22 11:20:08 +00:00
{{ end }}
</aside>
{{ end }}