{"id":149759,"date":"2020-09-02T14:22:00","date_gmt":"2020-09-02T06:22:00","guid":{"rendered":"http:\/\/4563.org\/?p=149759"},"modified":"2020-09-02T14:22:00","modified_gmt":"2020-09-02T06:22:00","slug":"%e6%94%b9%e4%ba%86%e4%b8%8b-gitalk%ef%bc%8c%e5%a2%9e%e5%8a%a0%e4%ba%86%e5%8c%bf%e5%90%8d%e8%af%84%e8%ae%ba%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=149759","title":{"rendered":"\u6539\u4e86\u4e0b gitalk\uff0c\u589e\u52a0\u4e86\u533f\u540d\u8bc4\u8bba\u529f\u80fd"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6539\u4e86\u4e0b gitalk\uff0c\u589e\u52a0\u4e86\u533f\u540d\u8bc4\u8bba\u529f\u80fd               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <span><i><\/i> 13<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>gitalk \u662f\u4e2a\u5f88\u6709\u521b\u610f\u7684\u9879\u76ee\uff0c\u4e0d\u8fc7\u5b83\u7684\u7f3a\u70b9\u4e5f\u5f88\u660e\u663e\uff0c\u5b89\u5168\u6027\u6b20\u59a5\u3002\u4e4b\u524d\u5df2\u7ecf\u6709\u4eba\u5728 V2EX \u8ba8\u8bba\u8fc7 github \u6743\u9650\u7c92\u5ea6\u8fc7\u9ad8\uff0c\u6388\u6743\u65f6\u5bb9\u6613\u88ab\u6076\u610f\u5229\u7528\u7684\u95ee\u9898\u3002\u524d\u51e0\u5929\u7ed9\u535a\u5ba2\u6362\u8bc4\u8bba\u7cfb\u7edf\uff0c\u53d1\u73b0 gitalk \u8fd8\u662f\u5f88\u4e0d\u9519\u7684\uff0c\u4e8e\u662f\u6539\u4e86\u4e00\u4e0b\u3002<\/p>\n<p>\u533f\u540d\u8bc4\u8bba\u4e3b\u8981\u7684\u601d\u8def\u662f:<\/p>\n<ol>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 github \u8d26\u53f7<\/li>\n<li>\u83b7\u53d6\u8be5\u8d26\u53f7\u7684 personal access token\uff0cscope \u9009\u4e2d user \u548c repo<\/li>\n<li>\u628a\u8be5 token \u5b58\u653e\u4e8e\u670d\u52a1\u5668\uff0c\u7f16\u5199\u4e00\u6761 api<\/li>\n<li>\u4fee\u6539 gitalk \u7684 ui\uff0c\u65b0\u589e\u4e00\u4e2a<code>\u533f\u540d\u8bc4\u8bba<\/code>\u6309\u94ae\uff0c\u7528\u6237\u70b9\u51fb\u65f6\u628a\u6570\u636e\u53d1\u9001\u5230\u6211\u4eec\u7684 api\uff0c\u8ba9 server \u53bb\u5b8c\u6210\u521b\u5efa\u8bc4\u8bba\u7684\u8bf7\u6c42\u3002<\/li>\n<\/ol>\n<p>\u5f53\u7136\u4e5f\u53ef\u4ee5\u76f4\u63a5\u628a personal access token \u653e\u5230\u524d\u7aef\u76f4\u63a5\u8bf7\u6c42\uff0c\u8fd9\u6837\u5f88\u4e0d\u5b89\u5168\u5c31\u662f\u4e86\u3002\u6211\u8fd8\u628a\u5b83\u7684\u6388\u6743\u6d41\u7a0b\u4e5f\u653e\u5230\u4e86 server \u4e0a\uff0c\u89e3\u51b3\u5728 client \u66b4\u9732 secret \u7684\u95ee\u9898\u3002<\/p>\n<p>\u5927\u81f4\u5c31\u662f\u8fd9\u6837\uff0c\u61d2\u5f97\u4f7f\u7528\u7b2c\u4e09\u65b9\u7684\u8bc4\u8bba\u7cfb\u7edf\u3002gitalk \u539f\u751f\u652f\u6301 markdown \u548c\u5b83\u7684 ui \u90fd\u662f\u975e\u5e38\u5438\u5f15\u4eba\u7684~\u66f4\u8be6\u7ec6\u7684\u53ef\u4ee5\u770b\u770b\u6211\u535a\u5ba2\u7684\u4ecb\u7ecd\u3002<\/p>\n<p>https:\/\/wiyi.org\/gitalk-anonymous-comment.html<\/p>\n<p>\u6548\u679c:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/09\/20200905_5f53a7348f238.jpg\" alt=\"\u6539\u4e86\u4e0b gitalk\uff0c\u589e\u52a0\u4e86\u533f\u540d\u8bc4\u8bba\u529f\u80fd\" \/><\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>12<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3067995\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yanshenxian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             &gt; 1 \u6574\u4e2a OAuth \u6d41\u7a0b\u653e\u5728\u524d\u7aef\uff0c\u66b4\u9732\u4e86 client_id \u548c client_secret<br \/>&gt; \u9996\u5148\u6211\u628a\u6388\u6743\u6d41\u7a0b\u653e\u5230\u4e86 server \u7aef\uff0c\u89e3\u51b3\u7b2c\u4e00\u4e2a\u548c\u7b2c\u4e09\u4e2a\u95ee\u9898\u3002<\/p>\n<p>\u8fd9\u4e2a\u786e\u5b9e\u6709\u60f3\u6cd5                                                             <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3067996\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yanshenxian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u89c9\u5f97 client_id \u548c client_secret \u66b4\u6f0f\u4e86\u5176\u5b9e\u95ee\u9898\u4e5f\u4e0d\u5927\u3002\u53c2\u8003 https:\/\/github.com\/gitalk\/gitalk\/issues\/150<br \/>\u7528\u6237\u8981\u60f3\u83b7\u53d6\u5176\u4ed6\u4eba\u7684 Authorization Code \u5e76\u4e0d\u5bb9\u6613\u3002\u76f8\u53cd\u535a\u5ba2\u7ba1\u7406\u8005\u60f3\u8981\u83b7\u53d6\u6388\u6743\u8bc4\u8bba\u7528\u6237\u7684 token \u5f88\u5bb9\u6613\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3067997\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ochatokori <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 gitalk \u96be\u9053\u4e0d\u662f\u4e3a\u4e86\u7701\u53bb\u540e\u7aef\u670d\u52a1\u5668\u5417<br \/>\u65e2\u7136\u90fd\u6709\u540e\u7aef\u670d\u52a1\u5668\u7684\u76f4\u63a5\u670d\u52a1\u5668\u653e client_secret \u4e0d\u5c31\u884c\u4e86<\/p>\n<p>\u63a8\u8350\u7528 https:\/\/utteranc.es\/                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3067998\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yanshenxian <br \/>\u4ee3\u7801\u6211\u662f\u7528 node \u7684\u5199\u7684\u5851\u6599\u4ee3\u7801                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3067999\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yanshenxian client_secret \u6bd5\u7adf\u662f\u5c5e\u4e8e\u79c1\u5bc6\u7684\u6570\u636e\uff0c\u80fd\u4e0d\u66b4\u9732\u4e0d\u66b4\u9732\u66f4\u597d\u3002\u786e\u5b9e\u5982\u4f60\u6240\u8bf4\u535a\u5ba2\u7ba1\u7406\u8005\u80fd\u83b7\u53d6 accessToken\uff0c\u57fa\u4e8e\u8fd9\u4e2a\u8003\u8651\u624d\u52a0\u5165\u4e86\u533f\u540d\u7684\u529f\u80fd\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3068000\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ochatokori <br \/>@yanshenxian <\/p>\n<p>utterances \u4e4b\u524d\u6ca1\u4e86\u89e3\u8fc7\uff0c\u6709\u65f6\u95f4\u53bb\u7814\u7a76\u4e00\u4e0b\u3002\u5982\u679c\u80fd\u517c\u5bb9\u73b0\u6709\u7684\u4ee5\u540e\u82b1\u65f6\u95f4\u6298\u817e\u4e00\u4e0b\uff0c\u4e0d\u884c\u7684\u8bdd\u5c31\u6682\u65f6\u8fd9\u4e48\u7528\u7740\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3068001\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ochatokori <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yanshenxian \u7528\u6237\u4e00\u65e6\u540c\u610f\u6388\u6743(\u8bc1\u660e\u7528\u6237\u4fe1\u4efb\u8fd9\u4e2a client_id \u548c client_secret)\uff0c\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u901a\u8fc7\u6cc4\u9732\u7684 client_id \u548c client_secret \u83b7\u53d6\u90a3\u4e2a\u7528\u6237\u7684 token\uff0c\u53ea\u8981\u7528\u6237\u8bbf\u95ee\u4e86\u653b\u51fb\u8005\u7684\u7f51\u7ad9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3068002\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yanshenxian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ochatokori \u5c31\u7b97\u66b4\u6f0f\u4e86\uff0c\u53ea\u6709\u7528\u6237\u663e\u793a\u70b9\u51fb\u767b\u5f55\u624d\u80fd\u62ff\u5230 token \u5427\uff0c\u8fd9\u6837\u548c\u653b\u51fb\u8005\u7528\u81ea\u5df1\u7684 client_id \u548c client_secret \u6709\u4ec0\u4e48\u533a\u522b\uff0c\u96be\u9053\u8fd8\u6709\u5176\u4ed6\u529e\u6cd5\u76f4\u63a5\u83b7\u53d6\uff1f\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3068003\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : stebest <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u6837\u5c31\u521b\u5efa\u4e86\u5f88\u591a\u65e0\u610f\u4e49\u7684\u50f5\u5c38\u53f7\uff0c\u662f\u4e0d\u662f\u6709\u70b9\u6d6a\u8d39\u8d44\u6e90\u3002<br \/>\u5229\u7528 github \u5b58\u50a8\u8bc4\u8bba\u53ef\u4ee5\u7b97\u6b63\u5f53\u4f7f\u7528\uff0c\u4f46\u8fd9\u4e2a\u4e0d\u505c\u7684\u521b\u5efa\u65e0\u610f\u4e49\u7684\u5c0f\u53f7\uff0c\u5c31\u7b97\u6ee5\u7528\u4e86\u5427\uff1f\u70b9\u533f\u540d\u8bc4\u8bba\u65f6\u5019\u5207\u6362\u5230\u522b\u7684\u8bc4\u8bba\u7cfb\u7edf\uff0c\u6211\u89c9\u5f97\u8fd8\u662f\u633a\u65b9\u4fbf\u7684\uff0c\u6211\u81ea\u5df1\u4e5f\u662f\u8fd9\u6837\uff0c\u611f\u89c9\u6548\u679c\u8fd8\u884c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3068004\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ruanimal <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u5565\u95ee\u9898\uff0c\u53cd\u6b63\u5927\u90e8\u5206\u4eba\u535a\u5ba2\u6ca1\u51e0\u4e2a\u8bc4\u8bba\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3068005\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @stebest <br \/>\u8fd8\u4e0d\u81f3\u4e8e\u5230\u6ee5\u7528\u7684\u7a0b\u5ea6\uff0c\u628a\u8fd9\u4e2a\u5f53\u4f5c\u4e2a\u4eba\u7684\u5c0f\u53f7\u6765\u7528\u5373\u53ef\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3068006\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ochatokori <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yanshenxian #8 \u53ea\u6709\u7b2c\u4e00\u6b21\u8981\u70b9\u767b\u5f55(\u5c31\u662f\u5728\u535a\u5ba2\u90a3\u4e2a\u5730\u65b9)\uff0c\u4e4b\u540e\u5982\u679c\u8bbf\u95ee\u653b\u51fb\u8005\u7684\u7f51\u7ad9\uff0c\u653b\u51fb\u8005\u7684\u7f51\u7ad9\u5e94\u8be5\u5c31\u53ef\u4ee5\u76f4\u63a5\u7528 client_id&amp;client_secret \u62ff\u5230 token \u4e86(\u6211\u4e0d\u662f\u5f88\u786e\u5b9a github \u7684 oauth \u6709\u6ca1\u6709\u5224\u65ad referrer)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6539\u4e86\u4e0b gitalk\uff0c\u589e\u52a0\u4e86\u533f\u540d\u8bc4&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/149759"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=149759"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/149759\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=149759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=149759"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=149759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}