成為我們的資助者或贊助商,以支持我們的工作。
該模塊於單頁頁面顯示一個內容面板,其包含了譯文、評論和倉庫相關按鈕。
| 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 屬性。 | 
comments | boolean | - | true | 為 true 時全局禁用評論。 | 
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      comments = true
 6      [params.hb.content_panel.repo]
 7        branch = 'main'
 8        repo = 'user/name'
 9        service = 'github'
10        subpath = 'exampleSite'
hugo.yaml
 1params:
 2  hb:
 3    content_panel:
 4      bottom: 20px
 5      comments: true
 6      repo:
 7        branch: main
 8        repo: user/name
 9        service: github
10        subpath: exampleSite
hugo.json
 1{
 2   "params": {
 3      "hb": {
 4         "content_panel": {
 5            "bottom": "20px",
 6            "comments": true,
 7            "repo": {
 8               "branch": "main",
 9               "repo": "user/name",
10               "service": "github",
11               "subpath": "exampleSite"
12            }
13         }
14      }
15   }
16}