Skip to content

Commit

Permalink
修改 README 文档说明
Browse files Browse the repository at this point in the history
  • Loading branch information
blinkfox committed Dec 2, 2019
1 parent f1adbe1 commit 9c7022b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 50 deletions.
51 changes: 25 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,28 +255,6 @@ menu:
icon: fas fa-image
```

### Add emoji support (Optional)

This theme adds support for the `emoji` emoticon, using the Hexo plugin for [hexo-filter-github-emojis] (https://npm.taobao.org/package/hexo-filter-github-emojis) to support The generation of the `emoji` expression, the corresponding `markdown emoji` syntax (`::`, for example: `:smile:`) is converted into a `emoji` expression that jumps. The installation command is as follows:

```bash
npm install hexo-filter-github-emojis --save
```

Add configuration of `_config.yml` file in Hexo root folder as follows:

```yaml
githubEmojis:
enable: true
className: github-emoji
inject: true
styles:
customEmojis:
```

Execute `hexo clean && hexo g` to regenerate the blog file, and then you can see the expression you wrote in the `emoji` grammar in the corresponding position in the article.


### Code highlight

Hexo theme uses Hexo's plugin[hexo-prism-plugin](https://github.com/ele828/hexo-prism-plugin) to show the code highlight instead of its own theme.The Installation commands are as follows:
Expand Down Expand Up @@ -314,7 +292,7 @@ search:
field: post
```

### Translate Chinese Link to Pinyin (Optional)
### Translate Chinese Link to Pinyin (Recommend)

Defualt permalinks of Hexo will include Chinese if your atrticle's title is Chinese.But it's adverse to `SEO`,and `gitment` comments don't suport Chinese Link as well.We can use the [hexo-permalink-pinyin](https://github.com/viko16/hexo-permalink-pinyin) of Hexo plugin to generate permalinks of Chinese Pinyin when generating posts.

Expand All @@ -334,7 +312,7 @@ permalink_pinyin:

> **Note*:[hexo-abbrlink](https://github.com/rozbo/hexo-abbrlink) can genarate non-Chinese link in addtion to this plugin.
### Post word count statistics plugin (Optional)
### Post word count statistics plugin (Recommend)

If you want to display the post word count and reading time information in the post detail page, you can install the [hexo-wordcount](https://github.com/willin/hexo-wordcount) plugin.

Expand All @@ -352,10 +330,31 @@ postInfo:
update: false
wordCount: false # set true.
totalCount: false # set true.
min2read: true
readCount: true
min2read: false # set true.
readCount: false # set true.
```

### Add emoji support (Optional)

This theme adds support for the `emoji` emoticon, using the Hexo plugin for [hexo-filter-github-emojis] (https://npm.taobao.org/package/hexo-filter-github-emojis) to support The generation of the `emoji` expression, the corresponding `markdown emoji` syntax (`::`, for example: `:smile:`) is converted into a `emoji` expression that jumps. The installation command is as follows:

```bash
npm install hexo-filter-github-emojis --save
```

Add configuration of `_config.yml` file in Hexo root folder as follows:

```yaml
githubEmojis:
enable: true
className: github-emoji
inject: true
styles:
customEmojis:
```

Execute `hexo clean && hexo g` to regenerate the blog file, and then you can see the expression you wrote in the `emoji` grammar in the corresponding position in the article.

### Add RSS feed support (Optional)

The theme uses the Hexo plugin[hexo-generator-feed](https://github.com/hexojs/hexo-generator-feed) to support `RSS` feed , and the Installation commands are as follows:
Expand Down
48 changes: 24 additions & 24 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,25 +255,6 @@ menu:
icon: fas fa-image
```

### 添加emoji表情支持(可选的)

本主题新增了对`emoji`表情的支持,使用到了 [hexo-filter-github-emojis](https://npm.taobao.org/package/hexo-filter-github-emojis) 的 Hexo 插件来支持 `emoji`表情的生成,把对应的`markdown emoji`语法(`::`,例如:`:smile:`)转变成会跳跃的`emoji`表情,安装命令如下:

```bash
npm install hexo-filter-github-emojis --save
```

在 Hexo 根目录下的 `_config.yml` 文件中,新增以下的配置项:

```yaml
githubEmojis:
enable: true
className: github-emoji
inject: true
styles:
customEmojis:
```

执行 `hexo clean && hexo g` 重新生成博客文件,然后就可以在文章中对应位置看到你用`emoji`语法写的表情了。

### 代码高亮
Expand Down Expand Up @@ -313,7 +294,7 @@ search:
field: post
```

### 中文链接转拼音(可选的
### 中文链接转拼音(建议安装

如果你的文章名称是中文的,那么 Hexo 默认生成的永久链接也会有中文,这样不利于 `SEO`,且 `gitment` 评论对中文链接也不支持。我们可以用 [hexo-permalink-pinyin](https://github.com/viko16/hexo-permalink-pinyin) Hexo 插件使在生成文章时生成中文拼音的永久链接。

Expand All @@ -333,7 +314,7 @@ permalink_pinyin:

> ****:除了此插件外,[hexo-abbrlink](https://github.com/rozbo/hexo-abbrlink) 插件也可以生成非中文的链接。
### 文章字数统计插件(可选的
### 文章字数统计插件(建议安装

如果你想要在文章中显示文章字数、阅读时长信息,可以安装 [hexo-wordcount](https://github.com/willin/hexo-wordcount)插件。

Expand All @@ -343,16 +324,35 @@ permalink_pinyin:
npm i --save hexo-wordcount
```

然后只需在本主题下的 `_config.yml` 文件中,激活以下配置项即可
然后只需在本主题下的 `_config.yml` 文件中,将各个文章字数相关的配置激活即可

```yaml
postInfo:
date: true
update: false
wordCount: false # 设置文章字数统计为 true.
totalCount: false # 设置站点文章总字数统计为 true.
min2read: true
readCount: true
min2read: false # 阅读时长.
readCount: false # 阅读次数.
```

### 添加emoji表情支持(可选的)

本主题新增了对`emoji`表情的支持,使用到了 [hexo-filter-github-emojis](https://npm.taobao.org/package/hexo-filter-github-emojis) 的 Hexo 插件来支持 `emoji`表情的生成,把对应的`markdown emoji`语法(`::`,例如:`:smile:`)转变成会跳跃的`emoji`表情,安装命令如下:

```bash
npm install hexo-filter-github-emojis --save
```

在 Hexo 根目录下的 `_config.yml` 文件中,新增以下的配置项:

```yaml
githubEmojis:
enable: true
className: github-emoji
inject: true
styles:
customEmojis:
```

### 添加 RSS 订阅支持(可选的)
Expand Down

0 comments on commit 9c7022b

Please sign in to comment.