Skip to content

Commit

Permalink
modify readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dotos committed Aug 17, 2017
1 parent e227bab commit 17f12eb
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions README.md
Expand Up @@ -24,22 +24,24 @@

## Installation
**1. Installation**
> :warning: **You must first reference the package AV in the web page**
> `<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>`
> :warning: **You must first reference the package `av-min.js` in the web page**
```html
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="./dist/Valine.min.js"></script>
```
or
```html
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//cdn.jsdelivr.net/npm/valine@1.1.4/dist/Valine.min.js"></script>
```
or via `npm`
```bash
npm install valine --save
```
```js
import Valine from 'valine'
or
```html
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src='//unpkg.com/valine@1.1.4/dist/Valine.min.js'></script>
```
or via [npm](https://www.npmjs.com/package/valine)

**2. Get `appId`/`appKey` from Leancloud**
[Click here](https://leancloud.cn/dashboard/login.html#/signup) to register or login in `leancloud`.
[Click here](https://leancloud.cn/dashboard/applist.html#/newapp) Create new application in `Leancloud`, and you will get `appId`/`appKey`.
Expand All @@ -62,11 +64,12 @@ import Valine from 'valine'
new Valine({
av: AV, // source from av-min.js
el: '.comment' ,
notify:true, // 邮件提醒 v1.1.4新增
verify:true, // 验证码 v1.1.4新增
notify:false, // 邮件提醒 v1.1.4新增
verify:false, // 验证码 v1.1.4新增
app_id: 'your appid',
app_key: 'your appkey',
placeholder: 'ヾノ≧∀≦)o来啊,快活啊!'
placeholder: 'ヾノ≧∀≦)o来啊,快活啊!',
path:window.location.pathname // 配置路径 v1.1.5新增
});
</script>
</body>
Expand Down

0 comments on commit 17f12eb

Please sign in to comment.