mirror of
https://github.com/xlucn/PAT.git
synced 2026-10-07 10:52:46 +08:00
38 lines
1.7 KiB
HTML
38 lines
1.7 KiB
HTML
{%- if page.comments != false and jekyll.environment == "production" -%}
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
|
||
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
|
||
|
||
<span style="color:gray;font-size:smaller;">
|
||
评论系统搞定了!用github账号登录就可以啦!<br>
|
||
温馨提示:回复中包含整段代码(如c语言),请使用markdown语法<code>```c\n代码\n```</code>(<code>\n</code>是真的换行 :) ),<code>`</code>为反引号(键盘1左边)。行间代码可以用<code>`i = 1`</code>。请利用<em>预览功能</em>将回复内容整理美观,谢谢!
|
||
</span>
|
||
<div id="gitalk-container"></div>
|
||
|
||
<script>
|
||
const gitalk = new Gitalk({
|
||
clientID: "{{site.gitalk.clientID}}",
|
||
clientSecret: "{{site.gitalk.clientSecret}}",
|
||
repo: "{{site.gitalk.repo}}",
|
||
owner: "{{site.gitalk.owner}}",
|
||
/* A configuration in this file: id */
|
||
id: "{{page.url | remove: ".html" | split: '/' | join ' ' | strip}}",
|
||
admin: [
|
||
{% for gitalk_admin in site.gitalk.admin %}
|
||
"{{gitalk_admin}}",
|
||
{% endfor %}
|
||
],
|
||
labels: [
|
||
{% for gitalk_lable in site.gitalk.labels %}
|
||
"{{ gitalk_lable }}",
|
||
{% endfor %}
|
||
],
|
||
pagerDirection: "{{site.gitalk.pagerDirection}}",
|
||
distractionFreeMode: {{site.gitalk.distractionFreeMode}},
|
||
createIssueManually: {{site.gitalk.createIssueManually}}
|
||
})
|
||
|
||
gitalk.render("gitalk-container")
|
||
</script>
|
||
|
||
{%- endif -%}
|