在博客下面添加评论区gittack© lunarscents

在博客下面添加评论区gittack

在博客下面添加评论区gittack

主流程: https://www.jianshu.com/p/4242bb065550

如何注册一个Github Application:https://blog.csdn.net/xingkaifan/article/details/81105352

代码配置:https://blog.csdn.net/Madridcrls7/article/details/80871596

<!-- Link Gitalk 的支持文件  -->
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
<script src="https://unpkg.com/gitalk@latest/dist/gitalk.min.js"></script>
<div id="gitalk-container"></div> <script type="text/javascript">
var gitalk = new Gitalk({

// gitalk的主要参数
clientID: '复制刚才生成的clientID',
clientSecret: '复制刚才生成的clientSecret',
repo: '用于存放的仓库',
owner: 'GitHub的用户名',
admin: ['Github的用户名'],
id:window.location.pathname,

});
gitalk.render('gitalk-container');
</script>
<!-- Gitalk end -->

配置成功后, 会显示
Nrj7WR.png

这时候只要登录,留下评论,就可以初始化了~!!
NrjbS1.png

Enjoy!~

Author

Karobben

Posted on

2020-06-26

Updated on

2023-06-06

Licensed under

Comments