Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
LolipopJ committed Jul 18, 2021
1 parent a0f9bda commit 5709502
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,18 @@
Archer 主题依赖于 `hexo-generator-json-content``hexo-wordcount`,因此需要在 Hexo 根目录执行以下命令:

``` bash
npm i hexo-generator-json-content --save
npm i hexo-wordcount --save
npm install hexo-generator-json-content --save
npm install hexo-wordcount --save
```

### 拉取主题文件

还是在 Hexo 根目录执行下面的命令:
依赖安装完成后,拉取 Archer 主题到 `themes/archer` 目录,在 Hexo 根目录执行下面的命令:

``` bash
git clone https://github.com/fi3ework/hexo-theme-archer.git themes/archer --depth=1
```

现在,Archer 主题已经顺利拉取到 `themes/archer` 目录下。

### 设置 Hexo 博客主题为 Archer

修改 Hexo 根目录下的 `_config.yml` 文件中的 `theme` 字段为 `archer`
Expand All @@ -54,28 +52,28 @@ theme: archer

``` yaml
jsonContent:
meta: true
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: true
excerpt: false
categories: true
tags: true
meta: true
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: true
excerpt: false
categories: true
tags: true
```

### 启动博客预览

在 Hexo 根目录下执行 `hexo s`,即可启用本地博客预览
在 Hexo 根目录下执行 `hexo s`,即可启动本地博客预览

## 主题配置

Expand Down Expand Up @@ -114,25 +112,27 @@ jsonContent:
npm install hexo-filter-mermaid-diagrams --save
```

然后在 Archer 主题目录下的 `_config.yml` 设置启用 Mermaid:
然后在 Archer 主题目录下的 `_config.yml` 设置以启用 Mermaid:

``` yml
mermaid:
enable: true
enable: true
```

现在,您可以在任意文章中添加下面的内容(需要去掉第一行和最后一行多的空格),测试 Mermaid 是否启用成功:
测试 Mermaid 是否启用成功,您可以在任意文章中添加下面的内容(您需要取消缩进)

``` plaintext
` `` mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
` ``
``` markdown
``` mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
```

> ❗️❗️❗️ 注意:如果您需要使用**类图**,请编辑您 Hexo 根目录下的 `_config.yml` 文件,设置 `external_link: false`。请确保这个设置对您原来的博客功能没有影响,这是 Hexo 本身的 bug。
### 其它可选配置

- [启用 about 页](https://github.com/fi3ework/hexo-theme-archer/wiki/%E5%90%AF%E7%94%A8about%E9%A1%B5)
Expand Down

0 comments on commit 5709502

Please sign in to comment.