list
<time datetime="2023-06-18 00:00:00 +0000 UTC">June 18 2023</time><span class="px-2 text-primary-500">·</span><time datetime="2024-02-20 16:00:25 -0600 CST">Updated: February 20 2024</time><span class="px-2 text-primary-500">·</span><span>389 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">2 mins</span>
Blowfish
Shortcodes
List
blowfish shortcodes - This article is part of a series.
🐡 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-06-30 00:00:00 +0000 UTC">June 30 2023</time><span class="px-2 text-primary-500">·</span><time datetime="2024-02-28 22:28:09 -0600 CST">Updated: February 28 2024</time><span class="px-2 text-primary-500">·</span><span>227 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">2 mins</span>
Blowfish
Shortcodes
Alert
🐡 Create a stylized message box
Article
<time datetime="2023-06-30 00:00:00 +0000 UTC">June 30 2023</time><span class="px-2 text-primary-500">·</span><time datetime="2024-02-20 16:00:25 -0600 CST">Updated: February 20 2024</time><span class="px-2 text-primary-500">·</span><span>96 words</span><span class="px-2 text-primary-500">·</span><span title="Reading time">1 min</span>
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