评论系统

This commit is contained in:
lianglianglee 2023-11-13 17:23:26 +08:00
parent 29ed9f44eb
commit 40fe6d948a
2 changed files with 18 additions and 5 deletions

View File

@ -93,5 +93,14 @@ function hide_canvas() {
overlay.classList.remove('show')
}
const gitalk = new Gitalk({
clientID: 'a0fe07089fe55e24df4e',
clientSecret: '58bc23313fbc2e117a34f024967b6b3caaffc1e9',
repo: 'com-lianglianglee-learn', // The repository of store comments,
owner: 'lianglianglee-learn',
admin: ['lianglianglee-learn'],
id: document.title, // Ensure uniqueness and length less than 50
distractionFreeMode: false // Facebook-like distraction free mode
})
gitalk.render('gitalk-container')

View File

@ -9,7 +9,7 @@
<meta http-equiv='content-language' content='zh-cn'>
<meta name='description' content={{.title}}>
<link rel="icon" href="/static/favicon.png">
<title >{{.title}} </title>
<title>{{.title}} </title>
<!-- Spectre.css framework -->
<link rel="stylesheet" href="/static/index.css">
<link rel="stylesheet" href="/static/highlight.min.css">
@ -18,6 +18,8 @@
<meta name="generator" content="Hexo 4.2.0">
<script async defer data-website-id="83e5d5db-9d06-40e3-b780-cbae722fdf8c"
src="http://analyze.lianglianglee.com/umami.js"></script>
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
</head>
<body>
@ -37,7 +39,7 @@
<ul class="uncollapsible">
{{range $i, $v := .list}}
<li>
<a class ="menu-item" id="{{$v.FileName}}" href="{{$v.FilePath}}">{{$v.FileName}}</a>
<a class="menu-item" id="{{$v.FileName}}" href="{{$v.FilePath}}">{{$v.FileName}}</a>
</li>
{{end}}
<li><a href="/assets/捐赠.md">捐赠</a></li>
@ -80,6 +82,8 @@
</div>
</div>
<div id="gitalk-container"></div>
</div>
</div>
</div>