提交 6a164766 编写于 作者: EvanOne(文一)'s avatar EvanOne(文一)

fix: Solve peoblem of repeating initial comment by gitalk & gitment

上级 a2016e8a
......@@ -4,14 +4,12 @@ script(src="https://cdn.jsdelivr.net/npm/js-md5@latest/src/md5.min.js")
-
let lang = _.get(theme, 'gitalk.language')
? theme.gitalk.language : (config.language
? config.language : (window.navigator.language ||
window.navigator.userLanguage));
? theme.gitalk.language : config.language;
script.
window.onload = function() {
let gitalk = new Gitalk({
id: md5(decodeURI(location.pathname)),
id: md5('!{ page.path }'),
clientID: '!{ theme.gitalk.client_id }',
clientSecret: '!{ theme.gitalk.client_secret }',
repo: '!{ theme.gitalk.repo }',
......
link(href="https://cdn.jsdelivr.net/npm/gitment/style/default.min.css" rel="stylesheet" type="text/css")
script(src="https://cdn.jsdelivr.net/npm/gitment/dist/gitment.browser.min.js")
script(src="https://cdn.jsdelivr.net/npm/js-md5@latest/src/md5.min.js")
script.
function renderGitment() {
let gitment = new Gitment({
id: window.location.pathname,
id: md5('!{ page.path }'),
owner: "!{ theme.gitment.owner }",
repo: "!{ theme.gitment.repo }",
oauth: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册