Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.
/ Coalk Public archive

⚠️(OBSOLETE) 💬A comment component base on firebase realtime database for static pages.

License

Notifications You must be signed in to change notification settings

huiyifyj/Coalk

Repository files navigation

Coalk

TravisCI npm firebase LICENSE

💬 Coalk is comment component base on firebase realtime database for static pages.

Preview Live

Note: This project is developing.

Features

  • Simple and lightweight.
  • No server-side implementation.
  • Support on authentication with gravatr json API.
  • Serverless, data be stored in firebase realtime database.

Install

  • Via npm :
$ npm i coalk
  • Import CDN :
<!-- Temporary vacancy -->
  • Build files :
$ npm i
$ npm run build

Then generate coalk.min.css and coalk.min.js and their sourcemap files in dist folder.

Usage

Add a container to you page:

<div id="coalk"></div>

Then use the Javascript code below to new a comment instance:

<script>
new Coalk({
    apiKey: 'Firebase apiKey',
    databaseURL: 'Firebase databaseURL',
    authDomain: "Firebase authDomain",
    // And other options setting.
});
</script>

About options parameters

Option Default Description
cdn https://gravatar.loli.net/avatar/ string
The gravatar CDN url.
row 8 number
The comment maximum number loaded initially.
language navigator.browserLanguage.toLowerCase() string
The language setting, values: 'en', 'zh-cn'.
apiKey null string
Your firebase apiKey.
authDomain null string
Your firebase Authentication authDomain.
databaseURL null string
Your firebase realtime database databaseURL.

Development

$ git clone git@github.com:huiyifyj/comment.js.git
$ cd comment.js
$ npm install
$ npm run dev

Then open your browser, visit http://127.0.0.1:3000/ .

License

MIT



© 2019   |   Huiyi.FYJ

About

⚠️(OBSOLETE) 💬A comment component base on firebase realtime database for static pages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published