内容面板模块

本页内容

该模块于单页页面显示一个内容面板,其包含了译文、评论和仓库相关按钮。

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

站点参数

ParameterTypeRequiredDefaultDescription
bottomstring-20pxbottom 属性。
commentsboolean-truetrue 时全局禁用评论。
repoobject--仓库设置。
repo.branchstring-main分支名称。
repo.repostringY-仓库名称,如 user/name
repo.servicestringY-Git 服务提供商:githubgitlabgiteecodeberg
repo.service_baseurlstring--自托管的 Git 服务器 URL。
repo.subpathstring--内容子路径,如 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}