This shortcode generate a list of articles in card style.
1{{< bs/article-cards >}}
limit
Position | Name | Type | Default | Required |
---|---|---|---|---|
- | limit | number | 12 | - |
The number of articles.
linkText
Position | Name | Type | Default | Required |
---|---|---|---|---|
- | linkText | string | Read more | - |
The text of link, the entire card will be clickable when empty.
sections
Position | Name | Type | Default | Required |
---|---|---|---|---|
- | sections | string | - | - |
The article sections, multiple sections separated by comma, such as blog,docs
.
summaryLen
Position | Name | Type | Default | Required |
---|---|---|---|---|
- | summaryLen | number | 240 | - |
The max length of summary.
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}
Name | Type | Required | Default | Description |
---|---|---|---|---|
limit | number | - | 12 | The default number of posts. |
image_height | number | - | 240 | The default height of image. |
1{{< bs/article-cards limit=3 >}}
1{{< bs/article-cards limit=3 linkText="" >}}