-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
permalink: /:collection/:path/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title: 网站配置 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
在 `_config.yml` 文件中声明的用于控制主题预置渲染逻辑的配置项,它们都挂在 `ksio` 下面,通过 `site.ksio` 访问—— | ||
|
||
配置项「值类型」有 `Link` 字样的,代表 `Link` 是一个描述链接信息的对象,用 TypeScript 的类型表现为: | ||
|
||
{% highlight typescript %} | ||
interface Link { | ||
text: string; | ||
url?: string; | ||
children?: Link[]; | ||
} | ||
{% endhighlight %} | ||
|
||
可用配置项有: | ||
|
||
| 属性名 | 值类型/可选值 | 默认值 | 说明 | | ||
| --- | --- | --- | --- | | ||
| `brand` | `object` | - | 品牌相关配置,主要控制页头左上角的链接与文本,详见下方 | | ||
| `navs` | `Link[]` | - | 页面头部导航 | | ||
| `links` | `Link[]` | - | 页面底部链接 | | ||
| `modules` | `object` | - | 模块功能控制,详见下方 | | ||
|
||
## `brand` | ||
|
||
| 属性名 | 值类型/可选值 | 默认值 | 说明 | | ||
| --- | --- | --- | --- | | ||
| `text` | `string` | `site.title` | 当前网站品牌所要显示的文本,不指定则显示网站标题 | | ||
| `parent` | `Link` | - | 当前网站的父品牌,指定后会在当前网站品牌的左边显示 | | ||
|
||
## `modules` | ||
|
||
| 属性名 | 值类型/可选值 | 默认值 | 说明 | | ||
| --- | --- | --- | --- | | ||
| `social` | `object` | - | 社交相关功能的开关与配置,详见下方 | | ||
|
||
### `social` | ||
|
||
结构、默认值与说明如下: | ||
|
||
{% highlight js %} | ||
{ | ||
share: false, // 是否启用将页面分享到其他 SNS 的按钮 | ||
} | ||
{% endhighlight %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ cookbook: | |
- text: 概述 | ||
collection: pages | ||
slug: guides | ||
- text: API | ||
collection: apis | ||
items: | ||
- site-config |