Skip to content

Commit

Permalink
Prepare publications list for name change
Browse files Browse the repository at this point in the history
  • Loading branch information
heinrichreimer committed Jun 17, 2024
1 parent b2f5446 commit 519ea44
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
10 changes: 6 additions & 4 deletions data/facts.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Jan Heinrich Reimer
aliases:
- Jan Heinrich Merker
address:
street: "Hohestieg 12"
zip: "38118"
city: "Braunschweig"
country: "Deutschland"
street: Hohestieg 12
zip: 38118
city: Braunschweig
country: Deutschland
birthday: 1998-01-25
mail: heinrich@reimer.family
phone: +49 174 9273954
34 changes: 23 additions & 11 deletions layouts/shortcodes/cv/publications.gohtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{{- $author := site.Data.facts.name -}}
{{- $authors := slice site.Data.facts.name -}}
{{- with site.Data.facts.aliases -}}
{{- $authors = $authors | collections.Append . -}}
{{- end -}}

{{- $webisPublicationsUrl := "https://webis.de/publications.html" -}}

Expand Down Expand Up @@ -73,8 +76,15 @@
{{/* Filter author entries. */}}
{{- $authorEntries := slice -}}
{{- range $entries -}}
{{- if or (not $author) (in (index . "-data-author") $author) -}}
{{- $authorEntries = $authorEntries | append . -}}
{{- $entry := . -}}
{{- $fromAuthor := false -}}
{{- range $authors -}}
{{- if in (index $entry "-data-author") . -}}
{{- $fromAuthor = true -}}
{{- end -}}
{{- end -}}
{{- if $fromAuthor -}}
{{- $authorEntries = $authorEntries | append $entry -}}
{{- end -}}
{{- end -}}

Expand Down Expand Up @@ -221,13 +231,17 @@
</th>
<td>
{{- range $coauthorIndex, $coauthor := $coauthors -}}
{{- $marked := false -}}
{{- range $authors -}}
{{- if in . $coauthor -}}
{{- $marked = true -}}
{{- end -}}
{{- end -}}
{{- if gt $coauthorIndex 0 -}}
{{- ", " -}}
{{- end -}}
{{- if $author -}}
{{- if in $author $coauthor -}}
<mark>
{{- end -}}
{{- if $marked -}}
<mark>
{{- end -}}
{{- $nameParts := split $coauthor " " -}}
{{- range $namePartIndex, $namePart := $nameParts -}}
Expand All @@ -238,10 +252,8 @@
{{- ". " -}}
{{- end -}}
{{- end -}}
{{- if $author -}}
{{- if in $author $coauthor -}}
</mark>
{{- end -}}
{{- if $marked -}}
</mark>
{{- end -}}
{{- end -}}
{{- ". " -}}
Expand Down

0 comments on commit 519ea44

Please sign in to comment.