{"id":2792,"date":"2018-05-16T17:11:55","date_gmt":"2018-05-16T09:11:55","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2792"},"modified":"2018-05-16T20:59:18","modified_gmt":"2018-05-16T12:59:18","slug":"gitalk-%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2792","title":{"rendered":"Gitalk \u6559\u7a0b"},"content":{"rendered":"<p>\n\t\u968f\u7740\u591a\u8bf4\uff0c\u7f51\u6613\u4e91\u8ddf\u5e16\u7b49\u7b2c\u4e09\u65b9\u8bc4\u8bba\u63d2\u4ef6\u7684\u5173\u95ed\uff0c\u5e02\u573a\u4e0a\u7559\u4e0b\u6765\u7684\u8bc4\u8bba\u63d2\u4ef6\u4e0d\u591a\u4e86\u3002\u5176\u4e2d disqus \u5728\u56fd\u5185\u901f\u5ea6\u592a\u6162\uff0c\u7545\u8a00\u73b0\u5728\u56de\u7ed9\u7f51\u7ad9\u6dfb\u52a0\u4e0a\u5e7f\u544a\uff0c\u800c\u4e14\u539f\u6765\u6240\u8bf4\u7684\u7ad9\u957f\u548c\u7545\u8a00\u5206\u6210\uff0c\u73b0\u5728\u4e5f\u6ca1\u6709\u4e86\u3002\u6240\u4ee5\u6211\u4eec\u7684\u53ef\u6709\u7684\u9009\u62e9\u4e0d\u591a\u4e86\u3002\n<\/p>\n<p>\n\t\u8981\u4e0d\u81ea\u5df1\u5f00\u53d1\u8bc4\u8bba\u7cfb\u7edf\uff0c\u8981\u4e0d\u5bfb\u627e\u5176\u4ed6\u51fa\u8def\u3002\u597d\u5728 github \u7684 Gitalk \u901f\u5ea6\u8fd8\u53ef\u4ee5\u3002\u4e5f\u6709\u4e0d\u5c11\u7f51\u53cb\u91c7\u7528\uff0c\u56e0\u6b64\u6211\u8fd9\u91cc\u6574\u7406\u4e86\u5173\u4e8e\u5b83\u7684\u4e00\u4e9b\u6559\u7a0b\u3002\n<\/p>\n<p>\n\tGitalk \u6700\u521d\u63a8\u51fa\u6765\uff0c\u5e94\u8be5\u662f\u60f3\u914d\u5408\u5728 github \u4e0a\u5efa\u535a\u5ba2\uff0c\u65b9\u4fbf\u6dfb\u52a0\u8bc4\u8bba\u529f\u80fd\u7684\u3002\u968f\u7740\u5176\u4ed6\u8bc4\u8bba\u63d2\u4ef6\u7684\u6ca1\u843d\uff0cGitalk \u5c31\u706b\u8d77\u6765\u4e86\u3002\n<\/p>\n<p>\n\tGitalk \u662f\u4e00\u4e2a\u57fa\u4e8e Github Issue \u548c Preact \u5f00\u53d1\u7684\u8bc4\u8bba\u63d2\u4ef6\u3002\u5b83\u9664\u4e86\u652f\u6301 Hexo \u5916\uff0c\u8fd8\u652f\u6301 java\uff0cphp \u7b49\u8bed\u8a00\u5f00\u53d1\u7684\u535a\u5ba2\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Register a new OAuth application\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/oauth-app.png\" style=\"width: 700px;height: 443px\" \/>\n<\/p>\n<h2>\n\tGitalk \u5b89\u88c5\u65b9\u6cd5<br \/>\n<\/h2>\n<p>\n\t\u7b2c\u4e00\u79cd\uff0c\u6700\u7b80\u5355\u7684\u5b89\u88c5\u65b9\u6cd5\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/unpkg.com\/gitalk\/dist\/gitalk.css&quot;&gt;\r\n&lt;script src=&quot;https:\/\/unpkg.com\/gitalk\/dist\/gitalk.min.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<p>\n\t\u7b2c\u4e8c\u79cd\uff0c\u4f7f\u7528npm\u547d\u4ee4\uff1a\n<\/p>\n<pre class=\"brush:bash;\">\r\nnpm i --save gitalk\r\nimport &#039;gitalk\/dist\/gitalk.css&#039;\r\nimport Gitalk from &#039;gitalk&#039;<\/pre>\n<p>\n\t\u5b89\u88c5\u597d\u4e4b\u540e\uff0c\u6211\u4eec\u5f00\u59cb\u4f7f\u7528\u5b83\u3002\u5728\u6587\u7ae0\u9875\u9762\uff0c\u52a0\u5165\u4e0b\u9762\u7684\u4ee3\u7801\u5373\u53ef\u5f00\u542f gitalk \u8bc4\u8bba\u529f\u80fd\u3002\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;div id=&quot;gitalk-container&quot;&gt;&lt;\/div&gt;\r\n&lt;script&gt;\r\nvar gitalk = new Gitalk({\r\n&nbsp;&nbsp; &nbsp;id: &#039;www.xttblog.com?p=2746&#039;,\r\n&nbsp;&nbsp; &nbsp;clientID: &#039;61bfc53d957e74e78f8f&#039;,\r\n&nbsp;&nbsp; &nbsp;clientSecret: &#039;31c61e66cdcc9ada8db2267ee779d0bdafac434c&#039;,\r\n&nbsp;&nbsp; &nbsp;repo: &#039;blog-comments&#039;,\r\n&nbsp;&nbsp; &nbsp;owner: &#039;xttblog&#039;,\/\/github\u7528\u6237\u540d\r\n&nbsp;&nbsp; &nbsp;admin: ['xttblog'],\/\/github\u7528\u6237\u540d\r\n&nbsp;&nbsp; &nbsp;labels: ['gitment'],\r\n&nbsp;&nbsp; &nbsp;perPage: 50,\r\n})\r\ngitalk.render(&#039;gitalk-container&#039;)\r\n&lt;\/script&gt;<\/pre>\n<p>\n\tclientID \u548c clientSecret \u662f\u4f60\u521b\u5efa<a href=\"https:\/\/github.com\/settings\/applications\/new\" name=\"OAuth application\" target=\"_blank\" title=\"OAuth application\">OAuth Application<\/a>\u540e\u751f\u6210\u7684\u4e24\u4e2a\u5bc6\u94a5\u3002\n<\/p>\n<h2>\n\t\u53c2\u8003\u8d44\u6599<br \/>\n<\/h2>\n<ul>\n<li>\n\t\t<a href=\"http:\/\/www.xttblog.com\/?p=1942\" target=\"_blank\" title=\"hexo \u547d\u4ee4\u4f7f\u7528\u6559\u7a0b\">hexo \u547d\u4ee4\u4f7f\u7528\u6559\u7a0b<\/a>\n\t<\/li>\n<li>\n\t\t<a href=\"http:\/\/www.xttblog.com\/?p=1807\" target=\"_blank\" title=\"\u89e3\u51b3\u6267\u884chexo server\u51fa\u73b0Usage: hexo \u7684\u95ee\u9898\">\u89e3\u51b3\u6267\u884chexo server\u51fa\u73b0Usage: hexo \u7684\u95ee\u9898<\/a>\n\t<\/li>\n<li>\n\t\t<a href=\"http:\/\/www.xttblog.com\/?p=1805\" target=\"_blank\" title=\"\u89e3\u51b3\u6267\u884chexo\u547d\u4ee4\u540e\u51fa\u73b0bash: hexo: command not found\u9519\u8bef\u7684\u95ee\u9898\">\u89e3\u51b3\u6267\u884chexo\u547d\u4ee4\u540e\u51fa\u73b0bash: hexo: command not found\u9519\u8bef\u7684\u95ee\u9898<\/a>\n\t<\/li>\n<\/ul>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2792\">Gitalk \u6559\u7a0b<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u968f\u7740\u591a\u8bf4\uff0c\u7f51\u6613\u4e91\u8ddf\u5e16\u7b49\u7b2c\u4e09\u65b9\u8bc4\u8bba\u63d2\u4ef6\u7684\u5173\u95ed\uff0c\u5e02\u573a\u4e0a\u7559\u4e0b\u6765\u7684\u8bc4\u8bba\u63d2\u4ef6\u4e0d\u591a\u4e86\u3002\u5176\u4e2d disqus \u5728\u56fd\u5185\u901f\u5ea6\u592a\u6162\uff0c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1238,1639,1439],"class_list":["post-2792","post","type-post","status-publish","format-standard","hentry","category-yyzt","tag-blink","tag-gitalk","tag-hexo"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2792"}],"version-history":[{"count":2,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2792\/revisions"}],"predecessor-version":[{"id":2794,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2792\/revisions\/2794"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}