Comment service for web
Use NPM or Yarn
npm i @mrzhiin/modis
yarn add @mrzhiin/modis
Use Browser
- Full
<script src="path/modis.js"></script>
- Lite
<script src="//cdn.jsdelivr.net/npm/leancloud-storage@3.11.0/dist/av-min.js"></script>
<script src="path/modis.slim.js"></script>
<div id="modis"></div>
<script>
new Modis({
el: "#modis",
backend: "leancloud",
backendConfig: {
appId: "",
appKey: ""
}
});
</script>
Option | Type | Description | Default |
---|---|---|---|
el |
string/Element | CSS selector or Element | |
locale |
string | Language | zh-CN |
gravatar |
string | Gravatar request URL | https://www.gravatar.com/avatar/ |
gravatarParameters |
string | Gravatar request URL's combining parameters(Don't use s) | ?d=mp&s=60 |
pageSize |
number | Number of comment displayed per page | 10 |
pathnameGenerator |
function | ||
theme |
string | Theme | auto |
backend |
string | Backend service | leancloud |
backendConfig |
object | Backend service config |
Option | Type | Description | Default |
---|---|---|---|
appId |
string | Leancloud App appId | `` |
appKey |
string | Leancloud App appKey | `` |
spa |
boolean | false |
Option | Type | Description | Default |
---|---|---|---|
appId |
string | Leancloud App appId | `` |
appKey |
string | Leancloud App appKey | `` |
spa |
boolean | false |