소스 검색

fix: add definition for $show_organizations to People widget

Commit 97606bf added support for show_organizations in the people widget. The original author forgot to add the definition of this variable at top of the widget, leading to hugo not being able to build the site because the variable was not initialized.

This commit adds a definition for show_organizations at the top of the widget and fixes the build error.

Fix 97606bf
Emanuele Bardelli 4 년 전
부모
커밋
fe49f96267
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      wowchemy/layouts/partials/widgets/people.html

+ 2 - 1
wowchemy/layouts/partials/widgets/people.html

@@ -5,6 +5,7 @@
 {{ $page := .page }}
 {{ $show_social := $page.Params.design.show_social | default false }}
 {{ $show_interests := $page.Params.design.show_interests | default true }}
+{{ $show_organizations := $page.Params.design.show_organizations | default false }}
 
 <div class="row justify-content-center people-widget">
   {{ with $page.Title }}
@@ -51,7 +52,7 @@
 
     <div class="portrait-title">
       <h2>{{with $link}}<a href="{{.}}">{{end}}{{ .Title }}{{if $link}}</a>{{end}}</h2>
-      {{ if and $show_organizations .Params.organizations }}{{range .Params.organizations }}<h3><em>{{ .name | markdownify | emojify }}</em></h3>{{ end }}{{ end }}
+      {{ if and $show_organizations .Params.organizations }}{{ range .Params.organizations }}<h3>{{ .name }}</h3>{{ end }}{{ end }}
       {{ with .Params.role }}<h3>{{ . | markdownify | emojify }}</h3>{{ end }}
       {{ if $show_social }}{{ partial "social_links" . }}{{ end }}
       {{ if and $show_interests .Params.interests }}<p class="people-interests">{{ delimit .Params.interests ", " | markdownify | emojify }}</p>{{ end }}