HB 博客侧边栏简介模块

通过标题、描述、位置、社交连接等较少你自己或你的公司。

本页内容

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

站点参数

ParameterTypeRequiredDefaultDescription
avatarstring/images/logo.png位于 assets 目录下的图像地址。
avatar_sizenumber100图像的尺寸。
companystring公司名称,支持 Markdown 语法。
descriptionstring站点描述。描述或者座右铭,支持 Markdown 语法。
locationstring位置,支持 Markdown 语法。
socialsobject社交连接,由社交媒体映射到 ID。
titlestring站点标题。标题,支持 Markdown 语法。

hugo.toml

 1[params]
 2  [params.hb]
 3    [params.hb.blog]
 4      [params.hb.blog.sidebar]
 5        [params.hb.blog.sidebar.profile]
 6          avatar = '/images/logo.png'
 7          avatar_size = 100
 8          company = 'Company'
 9          description = 'Description or bio.'
10          location = 'Earth'
11          title = 'Name'
12          [params.hb.blog.sidebar.profile.socials]
13            github = 'hbstack'

hugo.yaml

 1params:
 2  hb:
 3    blog:
 4      sidebar:
 5        profile:
 6          avatar: /images/logo.png
 7          avatar_size: 100
 8          company: Company
 9          description: Description or bio.
10          location: Earth
11          socials:
12            github: hbstack
13          title: Name

hugo.json

 1{
 2   "params": {
 3      "hb": {
 4         "blog": {
 5            "sidebar": {
 6               "profile": {
 7                  "avatar": "/images/logo.png",
 8                  "avatar_size": 100,
 9                  "company": "Company",
10                  "description": "Description or bio.",
11                  "location": "Earth",
12                  "socials": {
13                     "github": "hbstack"
14                  },
15                  "title": "Name"
16               }
17            }
18         }
19      }
20   }
21}