Shortcode to generate a list of articles in card style.
Become a backer or sponsor to support our work.
Please do not use this shortcode on article detail page, otherwise infinite recursion issue will arise, it’s safe to use it on homepage, section list.
1{{< bs/article-cards >}}
limit| Position | Name | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
| - | limit | number | - | 12 | - | - |
The number of articles.
linkText| Position | Name | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
| - | linkText | string | - | Read more | - | - |
The text of link, the entire card will be clickable when empty.
sections| Position | Name | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
| - | sections | string | - | - | - | - |
The comma-separated sections, such as blog,docs, empty means all.
summaryLen| Position | Name | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
| - | summaryLen | number | - | 240 | - | - |
The max length of summary.
limit| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
limit | - | number | - | 12 | - | - |
The default number of articles.
image_height| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
image_height | - | number | - | 240 | - | - |
The default height of image.
hugo.yaml
1params:
2 bootstrap:
3 article_cards:
4 image_height: 240
5 limit: 12
hugo.toml
1[params]
2 [params.bootstrap]
3 [params.bootstrap.article_cards]
4 image_height = 240
5 limit = 12
hugo.json
1{
2 "params": {
3 "bootstrap": {
4 "article_cards": {
5 "image_height": 240,
6 "limit": 12
7 }
8 }
9 }
10}