2.1.0 • Published 5 years ago

gitting v2.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Gitting

Gitting is a modern comment component based on Github Issue API.

Demo Page

Screenshot

Install

Install with npm

$ npm install gitting

Or install with yarn

$ yarn add gitting
import Gitting from "gitting";
import "gitting/dist/gitting.css";

Or umd builds are also available

<link href="path/to/gitting.css" rel="stylesheet">
<script src="path/to/gitting.js"></script>

Will expose the global variable to window.Gitting.

Usage

<div class="gitting-container"></div>
import Gitting from 'gitting';

// Init
const gitting = new Gitting({
  clientID: '', // GitHub Application Client ID
  clientSecret: '', // GitHub Application Client Secret
  repo: '', // GitHub repo
  owner: '', // GitHub repo owner
  admin: [''], // GitHub repo owner and collaborators, only these guys can initialize github issues
  id: window.location.pathname, // Unique identifier as a label
  number: -1, // Issue number, Priority is greater than id
  labels: ['Gitting'], // Built-in labels, not recommended to change
  language: 'zh-cn', // 'zh-cn' and 'en'
  perPage: 10, // Number of comments per page
  maxlength: 500, // Comment on the maximum number of words
  avatar: 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png', // Default avatar
  proxy: 'https://cors-anywhere.herokuapp.com/https://github.com/login/oauth/access_token' // Access token proxy url
});

// Render
gitting.render('.gitting-container');

// Destroy
gitting.destroy();

Related

  • gitalk - Gitalk is a modern comment component based on Github Issue and Preact.
  • gitment - A comment system based on GitHub Issues.

License

MIT © Harvey Zack

2.1.0

5 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago