Skip to content

Instantly share code, notes, and snippets.

@marlluslustosa
Last active June 23, 2021 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marlluslustosa/5d28ffd9d1e21310c30f6fa3dc8b48df to your computer and use it in GitHub Desktop.
Save marlluslustosa/5d28ffd9d1e21310c30f6fa3dc8b48df to your computer and use it in GitHub Desktop.
frontend - gitalk anon
<link rel="stylesheet" href="/assets/js/gitalk/v1.6.8/gitalk.css">
<script src="/assets/js/gitalk/v1.6.8/gitalk.min.js"></script>
<div id="js-gitalk-container"></div><script>
var locationArr = window.location.pathname.split('/')
var gitalk = new Gitalk({
clientID: '',
clientSecret: '',
repo: 'gitalk_comments',
owner: 'marlluslustosa',
admin: ['marlluslustosa'],
//id: location.pathname,
id: locationArr[locationArr.length - 1],
perPage: 20,
//proxy: 'https://gitalk-anonmously-comment-kappa.vercel.app',
server: {
oauth_api: 'https://gitalk-anonmously-comment-kappa.vercel.app/api/authorize',
anonymous_api: 'https://gitalk-anonmously-comment-kappa.vercel.app/api/comment'
},
anonymous: {
accountName: 'araphen'
},
cache: {
comments: {
enable: true,
ttl: 600
},
userInfo: {
enable: true,
ttl: 3600
},
issue: {
enable: true,
ttl: -1
}
}
});
gitalk.render('js-gitalk-container');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment