diff --git a/exampleSite/content/home/projects.md b/exampleSite/content/home/projects.md index 8378d229..09e5be2b 100644 --- a/exampleSite/content/home/projects.md +++ b/exampleSite/content/home/projects.md @@ -39,6 +39,7 @@ subtitle = "" # Toggle between the various page layout types. # 1 = List + # 2 = Compact # 3 = Card # 5 = Showcase view = 3 diff --git a/layouts/partials/li_compact.html b/layouts/partials/li_compact.html index 1e8b72c2..e3adc23c 100644 --- a/layouts/partials/li_compact.html +++ b/layouts/partials/li_compact.html @@ -3,6 +3,12 @@ {{ $microdata_type := "CreativeWork" }} {{ $show_authors_only := false }}{{/* Show authors only or full metadata? */}} {{ $show_buttons := false }} +{{ $link := $item.RelPermalink }} +{{ $target := "" }} +{{ if $item.Params.external_link }} + {{ $link = $item.Params.external_link }} + {{ $target = "target=\"_blank\" rel=\"noopener\"" }} +{{ end }} {{/* Dynamic view adjusts to content type. */}} {{ if eq $item.Type "post" }} @@ -15,6 +21,10 @@ {{ $microdata_type = "ScholarlyArticle" }} {{ $show_authors_only = true }} {{ $show_buttons = true }} +{{ else if eq $item.Type "project" }} + {{ $microdata_type = "CreativeWork" }} + {{ $show_authors_only = true }} + {{ $show_buttons = true }} {{ end }} {{/* Get summary. */}} @@ -31,7 +41,7 @@
{{ . | markdownify | emojify }}
{{ end }} -