Giter VIP home page Giter VIP logo

react-duoshuo's Introduction

react-duoshuo2

A DuoShuo component for React.

Installation

$ npm install react-duoshuo2 --save

Usage

In index.html :

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>Demo</title>
  <link rel="stylesheet" href="index.css" />
</head>
<body>
  <div id="root"></div>
  <script src="common.js"></script>
  <script src="index.js"></script>
</body>
</html>

Then:

import DuoShuo from 'react-duoshuo2';

<DuoShuo
  domain="your-short-name"
  thread="your-data-thread-key"
/>

Properties

domain:   React.PropTypes.string.isRequired,  // DuoShuo short_name 多说二级域名
thread:   React.PropTypes.string.isRequired,  // 文章在原站点中的 ID 或其他唯一标识
image:    React.PropTypes.string,             // 文章图片地址,将用于转发时的附图
author:   React.PropTypes.string,             // 作者在本站中的 ID
position: React.PropTypes.string,             // 该页面中评论框的位置,取值 `top` (评论框在顶端显示),`bottom` (评论框在底端显示)
limit:    React.PropTypes.number,             // 单页显示评论数,取值范围: 1~200
order:    React.PropTypes.string,             // 排序方式,取值:`asc` (从旧到新),`desc` (从新到旧)
onReady:  React.PropTypes.func                // 插件加载完成后的回调函数

See more DuoShuo

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.