Skip to content

Commit

Permalink
📝 更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
esofar committed Oct 9, 2020
1 parent 99ea09d commit d6bb752
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 36 deletions.
Binary file added docs/_media/cfg-css.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/cfg-js.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/cfg-loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/cfg-skin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/cfg-title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/cfg-tpl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_media/favicon.ico
Binary file not shown.
66 changes: 32 additions & 34 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,57 @@

部署之前请先确认您的博客园账号已正常登陆,并且已联系管理员成功申请开通了 JS 权限。然后进入博客后台「设置」Tab页中完成下列配置。

## 获取文件
## 获取库文件

使用最新开发版本:
主题 Silence 作为在 Github 上开源的项目,可以使用 [jsDelivr](https://www.jsdelivr.com/) 提供的免费 CDN 服务。

```
https://cdn.jsdelivr.net/gh/esofar/cnblogs-theme-silence/dist/silence.min.css
https://cdn.jsdelivr.net/gh/esofar/cnblogs-theme-silence/dist/silence.min.js
https://cdn.jsdelivr.net/gh/esofar/cnblogs-theme-silence@3.0.0-beta2/dist/silence.min.css
https://cdn.jsdelivr.net/gh/esofar/cnblogs-theme-silence@3.0.0-beta2/dist/silence.min.js
```
> 注意`@3.0.0-beta2`是需要使用的版本号,发行版本请参见 [releases](https://github.com/esofar/cnblogs-theme-silence/releases),建议使用最新版本。
使用稳定指定版本:
```
https://cdn.jsdelivr.net/gh/esofar/[email protected]/dist/silence.min.css
https://cdn.jsdelivr.net/gh/esofar/[email protected]/dist/silence.min.js
```

注意`3.0.0-beta1`是需要使用的版本号,发行版本请参见 [releases](https://github.com/esofar/cnblogs-theme-silence/releases),强烈建议使用最新版本。

## 配置 CSS

在「页面定制 CSS 代码」处,将获取的 CSS 样式文件代码全部粘贴到这里。

> 若 CSS 文件通过`link`标签的方式载入,页面渲染时会有加载延迟的问题,影响用户体验。
![配置 CSS](_media/cfg-css.png)

> 若 CSS 文件通过`link`标签的方式载入,页面效果渲染会有延迟问题,非常影响用户体验。
## 配置 JS

在「博客侧边栏公告」处,配置用户选项,加载 JS 脚本文件。配置 `window.$silence` 的取值请参见 [配置选项](/options?id=配置选项)
在「博客侧边栏公告」处,配置用户选项,加载 JS 脚本文件。`window.$silence`取值请参见 [配置选项](/options?id=配置选项)

![配置 JS](_media/cfg-js.png)

```
<script>
window.$silence = {
// ...
};
</script>
<script src="https://cdn.jsdelivr.net/gh/esofar/[email protected]alpha/dist/silence.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/esofar/[email protected]beta2/dist/silence.min.js"></script>
```

## 配置 Loading

为了避免因网络不好等情况导致页面加载卡顿,造成不好的用户体验,给页面添加个 Loading 效果是挺有必要的
为了避免因网络不好等情况导致页面加载卡顿,造成不好的用户体验,给页面添加个 Loading 效果还是非常有必要的

在「页首 HTML 代码」处,从下面选择一种风格的 HTML 代码粘贴到这里。

![配置 Loading](_media/cfg-loading.png)

### 亮色风格

``` light
<div class="light-loading">
<div class="box">
<h2>Loading</h2>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<span></span><span></span><span></span><span></span><span></span><span></span><span></span>
</div>
</div>
```

### 暗色风格
Expand All @@ -65,19 +61,21 @@ https://cdn.jsdelivr.net/gh/esofar/[email protected]/dist/silenc
<div class="dark-loading">
<div class="box">
<h2>Loading</h2>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<span></span><span></span><span></span><span></span><span></span><span></span><span></span>
</div>
</div>
```

## 其他配置

- 「标题」处设置博客标题,注意不支持显示子标题。
- 「博客皮肤」处选择标准模板`Custom`
- 「禁用模板默认CSS」需要打对勾。
「标题」处设置博客标题,注意不支持显示子标题。

![](_media/cfg-title.png)

「博客皮肤」处选择标准模板`Custom`

![](_media/cfg-skin.png)

「禁用模板默认CSS」需要打对勾。

![](_media/cfg-tpl.png)
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta charset="UTF-8" />
<link rel="icon" href="_media/favicon.ico">
<link
rel="stylesheet"
href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css"
Expand All @@ -21,14 +22,13 @@
<script>
window.$docsify = {
name: "VERSION 3.X",
// logo: '/_media/icon.svg',
themeColor: '#5E72E4',
loadSidebar: true,
loadNavbar: true,
coverpage: true,
maxLevel: 3,
subMaxLevel: 3,
onlyCover: false,
// repo: "docsifyjs/docsify",
};
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
Expand Down

0 comments on commit d6bb752

Please sign in to comment.