Skip to content

tan520500/github-comments

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github 留言系统

在线预览

让评论质量更高,让网站与 Github 关联 适合程序员的评论系统,基于 Github issues 留言

preview

使用

data-api

<style>.gc-comments {font:12px/1.5 Lantinghei SC,Microsoft Yahei,Hiragino Sans GB,Microsoft Sans Serif,WenQuanYi Micro Hei,sans-serif}</style>
<script src="https://unpkg.com/github-comments@0.4.0/gc.js"></script>
<div class="gc-comments" data-repos="nimojs/github-comments" data-issues="1" >
    <div class="gc-comments-title">
        评论
    </div>
    <div class="gc-comments-info">
        想在此留下评论,请访问 <a target="_blank" href="issues_link">issues_link</a> 提交评论
    </div>
</div>

issues_link 会自动替换成 https://github.com/nimojs/github-comments/issues/1

gc.load()

gc.load(repos, issues, element)
// 或者
githubComments.load(repos, issues, element)
// 当 全局变量 gc 被占用时使用 githubComments
参数 说明 示例
repos 项目地址 nimojs/blog
issues issues id 2
element 渲染容器 "#demo" document.getElementById('demo') $('#demo')
<div id="demo"></div>
<script src="https://unpkg.com/github-comments@0.4.0/gc.js"></script>
<script>
gc.load('nimojs/blog', 2, '#demo')
</script>

灵感来自: http://fex.baidu.com/webuploader/demo.html
全站使用示例: http://fmsjs.org/

参与开发

git clone https://github.com/nimojs/github-comments.git
cd github-comments
npm i --registry=https://registry.npm.taobao.org
# server
npm run s
npm run dev

About

利用 github issues 生成网页评论框

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 56.7%
  • JavaScript 25.5%
  • HTML 17.8%