diff --git a/content/links.md b/content/links.md index 2cb0f4b..df55f00 100644 --- a/content/links.md +++ b/content/links.md @@ -13,7 +13,7 @@ You can click on the buttons to select only links with the given language or top A selection of my presentations and radio shows I participated in. By clicking on the respective icons you can watch the video recording, access the slides and listen to the audio recording. -{{< links type="av" >}} +{{< links type="av" limit="5" >}} ## Appearance in Media {#media} diff --git a/themes/hugo-sustain/layouts/shortcodes/links.html b/themes/hugo-sustain/layouts/shortcodes/links.html index b3b6010..78b3873 100644 --- a/themes/hugo-sustain/layouts/shortcodes/links.html +++ b/themes/hugo-sustain/layouts/shortcodes/links.html @@ -2,9 +2,22 @@ {{- $data := .Site.Data.links -}} {{- if $type -}} {{- $data = where $data "type" $type -}} -{{ end }} +{{- end }} +{{- $data = sort $data "date" "desc" }} +{{- $datalen := $data | len }} +{{- $limit := (.Get "limit" | default -1) | int }} +{{- $limit_trigger := false }}