# 给hexo博客文章设置访问密码

给hexo的文章设置访问密码

### 1、安装插件

```
npm install hexo-blog-encrypt
```

### 2、修改配置

在根目录的配置文件**_config.yml**中添加以下代码：

```
encrypt: 
 enable: true
```

### 3、博客文章添加加密字段

```
---
password: 密码
message: 提示文字
---
```

