list
<time datetime="2023-08-30 23:48:06 -0500 CDT">Updated: August 30 2023</time>
blowfish
shortcodes
list
blowfish shortcodes - This article is part of a series.
Part 14: This Article
🐡 Shortcodes
list
displays a … collection… of recent articles
List
will display a list of recent articles. This shortcode requires a limit value to constraint the list. Additionally, it supports a where
and a value
in order to filter articles by their parameters. Note that this shortcode will not display its parent page but it will count for the limit value.
Parameter | Description |
---|---|
limit |
Required. the number of recent articles to display. |
title |
Optional title for the list, default is Recent |
where |
The variable to be used for the query of articles e.g. Type |
value |
The value that will need to match the parameter defined in where for the query of articles e.g. for where == Type a valid value could be sample |
The values of the where
and value
parameters are used in the query:
where .Site.RegularPages $where $value
within the code of the shortcode.
Check Hugo docs to learn more about which parameters are available to use.
Example #1:
{{< list limit=2 >}}
Recent
Alert
<time datetime="2023-08-30 23:48:06 -0500 CDT">Updated: August 30 2023</time>
blowfish
shortcodes
alert
🐡 Create a stylized message box
Article
<time datetime="2023-08-30 23:48:06 -0500 CDT">Updated: August 30 2023</time>
article
shortcode
blowfish
🐡
Create an article card
Create an article card
Example #2:
{{< list title="Samples" limit=5 where="Type" value="sample" >}}
Samples
Multiple Authors
<time datetime="2022-10-12 00:00:00 +0000 UTC">October 12 2022</time><span class="px-2 text-primary-500">·</span><time datetime="2023-08-30 23:41:41 -0500 CDT">Updated: August 30 2023</time><span class="px-2 text-primary-500">·</span><span>14 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">1 min</span>
authors
sample
Thumbnails
<time datetime="2022-09-26 00:00:00 +0000 UTC">September 26 2022</time><span class="px-2 text-primary-500">·</span><time datetime="2023-08-19 21:44:35 -0500 CDT">Updated: August 19 2023</time><span class="px-2 text-primary-500">·</span><span>160 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">1 min</span>
thumbnail
sample
Icons
<time datetime="2020-08-14 00:00:00 +0000 UTC">August 14 2020</time><span class="px-2 text-primary-500">·</span><time datetime="2023-08-19 21:44:35 -0500 CDT">Updated: August 19 2023</time><span class="px-2 text-primary-500">·</span><span>191 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">1 min</span>
icons
sample
shortcodes
Markdown
<time datetime="2019-03-11 00:00:00 +0000 UTC">March 11 2019</time><span class="px-2 text-primary-500">·</span><time datetime="2023-08-19 21:44:35 -0500 CDT">Updated: August 19 2023</time><span class="px-2 text-primary-500">·</span><span>472 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">3 mins</span>
markdown
css
html
sample
Rich Content
<time datetime="2019-03-10 00:00:00 +0000 UTC">March 10 2019</time><span class="px-2 text-primary-500">·</span><time datetime="2023-08-19 21:44:35 -0500 CDT">Updated: August 19 2023</time><span class="px-2 text-primary-500">·</span><span>148 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">1 min</span>
shortcodes
privacy
sample
gist
twitter
youtube
vimeo
blowfish shortcodes - This article is part of a series.
Part 14: This Article