Customizable name for the List shortcode

This commit is contained in:
Nuno Coração
2023-01-24 22:39:45 +00:00
parent abfbdb8a4a
commit fa19f8c4d0
2 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -1,9 +1,10 @@
{{ $limit := .Get "limit" | default 1 }}
{{ $title := .Get "title" | default (i18n "shortcode.recent_articles" | emojify) }}
{{ $parent := .Page.RelPermalink }}
{{ $where := .Get "where" }}
{{ $value := .Get "value" }}
<h2 class="mt-20 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
<h2 class="mt-20 text-2xl font-extrabold mb-10">{{ $title }}</h2>
<section class="space-y-10 w-full mt-10 mb-10">
{{ if $where }}
{{ range ( where .Site.RegularPages $where $value | first $limit ) }}