Blog/配置说明.md

45 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## config.json 配置说明
- "port": 服务器监听的端口号,
- "pageSize": 首页每一页的文章数量,
- "descriptionLen": 文章没有配置description字段时默认取文章内容多少个字作为描述,
- "author": 博客作者,网站底部展示,
- "qq": 作者的QQ号,在说说中显示头像
- "icp": 网站的备案号,
- "webHookSecret": 博客文章更新勾子的密钥,这里要和你在仓库设置的密钥一样,
- "categoryDisplayQuantity": 在分类页面下,每个分类下最多展示多少篇文章,
- "utterancesRepo": 是否开启utterances评论留空没有评论否则填写评论存储的仓库name/repo,
- "gitalk_repo": 是否开启Gitalks评论留空没有评论否则填写评论存储的仓库repo,
- "gitalk_clientID": 应用id,
- "gitalk_clientSecret": 应用授权密钥,
- "gitalk_owner": 仓库所有者,
- "timeLayout": 解析时间的格式保持和你文章里面的date字段一样除非了解Golang的时间解析否则不要修改,
- "siteName": 网站的名字,
- "documentGitUrl": 你文章的git地址应用会把文章克隆在当前目录下,必须公开并且以.git结尾,
- "htmlKeywords": 网页里面的htmlKeywords,
- "htmlDescription": 网页里面的htmlDescription,
- "themePath": 主题路径,留空使用/blog,
- "themeColor": 博客的主题颜色,
- "dashboardEntrance": 网站仪表盘的访问路径,留空使用/admin,
- "themeOption": 网站可选择的主题颜色
- "memos_url": 说说和影集的memos网站地址不带后面的/
- "memos_user": 用户名称或者id
- "memos_album_tag": 影集所使用的标签
- "memos_talk_tag": 说说所使用的标签
## MD 文章支持的字段
- "title": 文章标题,不填使用文件名,
- "date": 文章日期,排序使用(导航文章使用这个来排序),
- "description": 文章描述
- "tags": 文章 tag
- "author": 文章作者
- "musicId": 网易云的歌单ID
> 文章的这些字段全部可以为空,但是没有日期会默认使用文件生成的日期,那样每次迁移文档时间都是不可控的。
## 其他
开启utterances评论之后utterancesRepo指向的仓库必须是公开并且可以被评论的具体使用请访问 https://utteranc.es
webHook的地址: 你的域名/api/git_push_hook