mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 12:13:19 +00:00
projects: Fix list of talks (#548)
- Sort list of talks by `time_start` rather than `date` (consistent with home page widget) - Fix bug that made publications duplicate in talks list when there was no talk in a project
This commit is contained in:
1 parent
c42f4a8cf2
commit
2bc968b9c5
1 file changed
+2
-2
@@ -49,11 +49,11 @@
|
||||
{{ end }}
|
||||
|
||||
{{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
|
||||
{{ $items := $items | union (where (where .Site.RegularPages "Type" "publication") ".Params.url_project" $project_path) }}
|
||||
{{ $items := $items | union (where (where .Site.RegularPages "Type" "talk") ".Params.url_project" $project_path) }}
|
||||
{{ $talks_len := len $items }}
|
||||
{{ if ge $talks_len 1 }}
|
||||
<h2>{{ (i18n "talks") }}</h2>
|
||||
{{ range $items }}
|
||||
{{ range sort $items ".Params.time_start" "desc" }}
|
||||
{{ partial "talk_li_simple" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
Reference in new issue
Block a user