diff --git a/docs/README.md b/docs/README.md
index b2b0374be6b4f4a461ab11e1dfa496fa05b78bec..f1d824ab03cdb66b796b19262663cf7eee8eb5e5 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -2,7 +2,7 @@
home: true
heroImage: /logo.png
actionText: Quick Started →
-actionLink: /guide/
+actionLink: /guide/quick-start
# features:
# - title: Simplicity First
# details: Minimal setup with markdown-centered project structure helps you focus on writing.
diff --git a/docs/advanced/optimize.md b/docs/advanced/optimize.md
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..14ff2cecb5e513a290b618582c094a67f22b7c63 100644
--- a/docs/advanced/optimize.md
+++ b/docs/advanced/optimize.md
@@ -0,0 +1,5 @@
+# Optimize
+
+**There is currently no English document, I will finish it as soon as possible. You can refer to the Chinese document first.**
+
+> If you are interested, you can help me improve the English documentation through [PR](https://github.com/liuyib/hexo-theme-stun/pulls), I will be very grateful.
diff --git a/docs/guide/primary-setting.md b/docs/guide/primary-setting.md
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..261e1d85971cb6fda20520e16af42ea3941b760a 100644
--- a/docs/guide/primary-setting.md
+++ b/docs/guide/primary-setting.md
@@ -0,0 +1,5 @@
+# Primary Setting
+
+**There is currently no English document, I will finish it as soon as possible. You can refer to the Chinese document first.**
+
+> If you are interested, you can help me improve the English documentation through [PR](https://github.com/liuyib/hexo-theme-stun/pulls), I will be very grateful.
diff --git a/docs/guide/quick-start.md b/docs/guide/quick-start.md
index 1983704bc0f43e6da17cca85502319b1a2c8ef76..8d669d52e4a2677dd6a79821176e37c98a89bde0 100644
--- a/docs/guide/quick-start.md
+++ b/docs/guide/quick-start.md
@@ -10,12 +10,12 @@
$ git clone https://github.com/liuyib/hexo-theme-stun.git themes/stun
```
-- Install `pug` and `stylus`
+- Install dependency `pug`
- The theme depends on `pug` and `stylus`, please run follow in your hexo directory.
+ Enter your hexo directory, run this.
``` bash
- $ npm install --save hexo-render-pug hexo-renderer-stylus
+ $ npm install --save hexo-render-pug
```
## How to use
diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md
index 32e15e94a82136fa3641a2f2b31042f0126e6eb9..a19b99521041a460490d960192c475b5448274ad 100644
--- a/docs/zh-CN/README.md
+++ b/docs/zh-CN/README.md
@@ -2,7 +2,7 @@
home: true
heroImage: /logo.png
actionText: 快速开始 →
-actionLink: /zh-CN/guide/
+actionLink: /zh-CN/guide/quick-start
# features:
# - title: Simplicity First
# details: Minimal setup with markdown-centered project structure helps you focus on writing.
diff --git a/docs/zh-CN/advanced/advanced-setting.md b/docs/zh-CN/advanced/advanced-setting.md
index c2ae8bc1166a0c4b9b9237e9c4c7000dd83a119f..1fd307e9b92e0edafe05310e619de16946798533 100644
--- a/docs/zh-CN/advanced/advanced-setting.md
+++ b/docs/zh-CN/advanced/advanced-setting.md
@@ -383,7 +383,9 @@ sidebar:
# 侧边栏距离顶部的距离(只支持 px 单位)
offsetTop: 20px
# 是否显示水平分割线
- horizon_line: true
+ horizon_line: false
+ # 侧边栏宽度(建议宽度:240px ~ 340px)
+ width: 280px
```
::: danger
@@ -407,7 +409,7 @@ toc:
# 生成目录时,解析 h 标签的最大深度
# 你可以在文章的 markdown 源文件的 Front-Matter 中,通过添加 `toc_max_depth` 属性,
# 来指定某篇文章生成目录时,解析 h 标签的最大深度
- max_depth: 6
+ max_depth: 4
```
其中 `expand_all` 。可以在文章的 markdown 源文件中的 `Front-Matter` 里,指定 `toc: true / false` 来设置某篇文章是否启用目录。
@@ -661,35 +663,11 @@ code_word_wrap: false
![](https://raw.githubusercontent.com/liuyib/picBed/master/hexo-theme-stun/doc/20190608214539.png)
-## 图片水平对齐方式
+## 图片水平对齐方式
-设置文章中图片的水平对齐方式,修改主题配置文件:
-
-``` yaml
-img_horizonal_align:
-```
-
-可选的值有:`left`, `center`, `right`。默认值为空,即不设置。
-
-> 默认情况下,图片显示居左,支持行内显示。如果你手动设置了图片的水平对齐方式,则图片不再支持行内显示。
-
-效果分别如下:
-
-- 设为默认值,即 `img_horizonal_align:` 设为空。
-
- ![](https://raw.githubusercontent.com/liuyib/picBed/master/hexo-theme-stun/doc/20190608220937.png)
-
-- `img_horizonal_align: left`
-
- ![](https://raw.githubusercontent.com/liuyib/picBed/master/hexo-theme-stun/doc/20190608215836.png)
-
-- `img_horizonal_align: center`
-
- ![](https://raw.githubusercontent.com/liuyib/picBed/master/hexo-theme-stun/doc/20190608215837.png)
-
-- `img_horizonal_align: right`
-
- ![](https://raw.githubusercontent.com/liuyib/picBed/master/hexo-theme-stun/doc/20190608215838.png)
+::: danger
+该配置项,即 `img_horizonal_align` 在 `v1.4.0` 版本中移除。
+:::
## 文字与图片的垂直对齐方式
diff --git a/docs/zh-CN/advanced/third-part.md b/docs/zh-CN/advanced/third-part.md
index 8a392956a61c542da6a51756207c760bbb3a7db6..ba41a1ae6fc7c86287ced4c3fa5efcc44b26d260 100644
--- a/docs/zh-CN/advanced/third-part.md
+++ b/docs/zh-CN/advanced/third-part.md
@@ -145,12 +145,46 @@ quicklink:
# - uri => uri.includes('.zip')
# - (uri, el) => el.hasAttribute('nofollow')
ignores:
+ - /\/api\/?/
+ - uri => uri.includes('.xml')
+ - uri => uri.includes('.zip')
+ - (uri, el) => el.hasAttribute('nofollow')
+ - (uri, el) => el.hasAttribute('noprefetch')
```
2. 添加 `Front-Matter`
上一步只是设置了 home 页面和 archive 页面是否启用 quicklink,对于其他页面或文章,你必须手动设置:在页面或文章的 markdown 文件的 `Front-Matter` 中,添加 `quicklink: true`。
+## 启用 Pjax
+
+启用 Pjax 可以让你的博客在页面之间跳转时,只进行局部刷新。这样不仅可以改善用户浏览体验,更能提高页面的加载速度。如果想启用这一功能,你需要修改主题配置文件:
+
+``` yaml
+pjax:
+ enable: true
+ # !!!如果你不了解 Pjax 的用法,请忽视下面的配置项
+ # 详参见: https://github.com/MoOx/pjax/#options
+ elements:
+ selectors:
+ switches:
+ switchesOptions:
+ history: true
+ scrollTo: false
+ scrollRestoration: false
+ cacheBust: false
+ debug: false
+ currentUrlFullReload: false
+ timeout: 0
+```
+
+::: warning 已知问题
+下面是启用 Pjax 之后,已知的一些问题。
+
+- 不兼容 MathJax(必须手动刷新页面一次后,MathJax 才能正常使用)
+- 不兼容评论(评论显示为空,必须手动刷新页面才能显示出用户的评论)
+:::
+
## 添加 Emoji 支持
如果想要使用 Emoji,你可以直接在[这里](http://emojihomepage.com/)复制粘贴使用。
@@ -298,29 +332,22 @@ disqus:
busuanzi:
# 是否启用
enable: false
- site:
- # 是否只显示图标
- icon_only: false
- # 统计站点 UV 数量
- # 关于 UV 和 PV 的概念:https://zhuanlan.zhihu.com/p/27672009/
- uv:
- # 是否启用
- enable: true
- # FontAwesome 图标名称: https://fontawesome.com/v4.7.0/icons/
- icon: user
- # 统计站点 PV 数量
- pv:
- # 是否启用
- enable: true
- # FontAwesome 图标名称
- icon: eye
+ # 是否只显示图标
+ icon_only: false
+ # 统计站点 UV 数量
+ site_uv:
+ enable: true
+ # FontAwesome 图标名称: https://fontawesome.com/v4.7.0/icons/
+ icon: user
+ # 统计站点 PV 数量
+ site_pv:
+ enable: true
+ # FontAwesome 图标名称: https://fontawesome.com/v4.7.0/icons/
+ icon: eye
# 统计每篇文章的 PV 数量
post_pv:
- # 是否只显示图标
- icon_only: false
- # 是否启用
enable: true
- # FontAwesome 图标名称
+ # FontAwesome 图标名称: https://fontawesome.com/v4.7.0/icons/
icon: eye
```
diff --git a/docs/zh-CN/guide/primary-setting.md b/docs/zh-CN/guide/primary-setting.md
index 167593f9ca00b379cc95c8839edac15081dec038..2992f0e3426360f132e1522572bb77ce1e7e33ca 100644
--- a/docs/zh-CN/guide/primary-setting.md
+++ b/docs/zh-CN/guide/primary-setting.md
@@ -18,7 +18,7 @@
## 添加新页面
-Stun 主题内置了三种页面:分类页、标签页、关于页。默认没有启用。想启用这些页面,需要按照如下步骤操作:
+Stun 主题内置有:分类页、标签页。默认没有启用。想启用这些页面,需要按照如下步骤操作:
1. 在 Hexo 根目录下执行命令
@@ -28,12 +28,21 @@ $ hexo new page categories
# 启用标签页,执行这条指令
$ hexo new page tags
+```
+
+2. 修改 Front-Matter
+
+找到 Hexo 根目录下的 `source/categories` 或 `source/tags` 文件夹中的 markdown 文件,添加 Front-Matter:
+
+``` yaml
+# 如果是分类页,添加这个
+type: "categories"
-# 启用关于页,执行这条指令
-$ hexo new page about
+# 如果是标签页,添加这个
+type: "tags"
```
-2. 然后修改主题配置文件,将 `categories` 或 `tags` 或 `about` 对应项取消注释
+3. 然后修改主题配置文件,将 `categories` 或 `tags` 对应项取消注释
``` yaml
menu:
@@ -43,11 +52,10 @@ menu:
archives: /archives/ || folder-open
# categories: /categories/ || th
# tags: /tags/ || tags
- # about: /about/ || user
# xxx: /xxx/ || xxx
```
-除了使用上述三种内置页面外,如果你想使用自定义页面,需要执行如下步骤:
+除了使用上述内置页面外,如果你想使用自定义页面,需要执行如下步骤:
以添加**阅读**页面为例。
@@ -62,7 +70,7 @@ menu:
> 图标的名称在这里获取:[https://fontawesome.com/v4.7.0/icons/](https://fontawesome.com/v4.7.0/icons/)。
-1. 创建页面文件
+2. 创建页面文件
在 Hexo 根目录下执行指令:
diff --git a/docs/zh-CN/guide/quick-start.md b/docs/zh-CN/guide/quick-start.md
index abbb8492483d4db93b7ecfd7befa10667298a785..b6b599681d4eeccb95d8e46465b881ee8d451318 100644
--- a/docs/zh-CN/guide/quick-start.md
+++ b/docs/zh-CN/guide/quick-start.md
@@ -10,12 +10,12 @@
$ git clone https://github.com/liuyib/hexo-theme-stun.git themes/stun
```
-- 安装 pug 和 stylus
+- 安装依赖 pug
- 主题依赖于 pug 和 stylus,请在 hexo 根目录,执行指令。
+ 进入 hexo 根目录,执行指令。
``` bash
- $ npm install --save hexo-render-pug hexo-renderer-stylus
+ $ npm install --save hexo-render-pug
```
## 使用