hugo-theme-stack-stars/layouts/partials/sidebar/right.html
Jimmy Cai 4d552a9df5
feat: article page widget support (#488)
* feat: article page widget support

* refactor: get rid of article toolbar

Same 3 column layout for article page and homepage

* add missing space
2022-02-26 23:45:25 +01:00

13 lines
No EOL
532 B
HTML

{{- $scope := default "homepage" .Scope -}}
{{- $context := .Context -}}
{{- with (index .Context.Site.Params.widgets $scope) -}}
<aside class="sidebar right-sidebar sticky">
{{ range $widget := . }}
{{ if templates.Exists (printf "partials/widget/%s.html" .type) }}
{{ partial (printf "widget/%s" .type) (dict "Context" $context "Params" .params) }}
{{ else }}
{{ warnf "Widget %s not found" .type }}
{{ end }}
{{ end }}
</aside>
{{ end }}