博客侧边栏文章模块

本页内容

本模块于博客侧边栏显示最近和精选的文章列表。

Modulegithub.com/hbstack/blog/modules/sidebar/posts
Repository⭐ Please consider giving a star if your like it.
Stars
Version
Used by
Requirements
License
UsageSee how to use modules.

站点参数

ParameterTypeRequiredDefaultDescription
featured_postsnumber5精选文章的数量。
fillbooleantruetrue 时,选项卡采用全宽。
recent_postsnumber5最新文章的数量。
stylestringpills选项卡样式:pillstabsunderline

hugo.toml

1[params]
2  [params.hb]
3    [params.hb.blog]
4      [params.hb.blog.sidebar]
5        [params.hb.blog.sidebar.posts]
6          featured_count = 5
7          fill = true
8          recent_count = 5
9          style = 'pills'

hugo.yaml

1params:
2  hb:
3    blog:
4      sidebar:
5        posts:
6          featured_count: 5
7          fill: true
8          recent_count: 5
9          style: pills

hugo.json

 1{
 2   "params": {
 3      "hb": {
 4         "blog": {
 5            "sidebar": {
 6               "posts": {
 7                  "featured_count": 5,
 8                  "fill": true,
 9                  "recent_count": 5,
10                  "style": "pills"
11               }
12            }
13         }
14      }
15   }
16}