该模块于单页页面显示一个内容面板,其包含了译文、评论和仓库相关按钮。
| Module | github.com/hbstack/content-panel | 
|---|---|
| Repository | ⭐ Please consider giving a star if your like it. | 
| Stars | |
| Version | |
| Used by | |
| Requirements | |
| License | |
| Usage | See how to use modules. | 
| Parameter | Type | Required | Default | Description | 
|---|---|---|---|---|
bottom | string | - | 20px | bottom 属性。 | 
repo | object | - | - | 仓库设置。 | 
repo.branch | string | - | main | 分支名称。 | 
repo.repo | string | Y | - | 仓库名称,如 user/name。 | 
repo.service | string | Y | - | Git 服务提供商:github、gitlab、gitee、codeberg。 | 
repo.service_baseurl | string | - | - | 自托管的 Git 服务器 URL。 | 
repo.subpath | string | - | - | 内容子路径,如 exampleSite。 | 
hugo.toml
1[params]
2  [params.hb]
3    [params.hb.content_panel]
4      bottom = '20px'
5      [params.hb.content_panel.repo]
6        branch = 'main'
7        repo = 'user/name'
8        service = 'github'
9        subpath = 'exampleSite'
hugo.yaml
1params:
2  hb:
3    content_panel:
4      bottom: 20px
5      repo:
6        branch: main
7        repo: user/name
8        service: github
9        subpath: exampleSite
hugo.json
 1{
 2   "params": {
 3      "hb": {
 4         "content_panel": {
 5            "bottom": "20px",
 6            "repo": {
 7               "branch": "main",
 8               "repo": "user/name",
 9               "service": "github",
10               "subpath": "exampleSite"
11            }
12         }
13      }
14   }
15}