add gittalk
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
This commit is contained in:
parent
3bcafa0be9
commit
258f054fca
@ -51,9 +51,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{- if (.Param "comments") }}
|
|
||||||
{{- partial "comments.html" . }}
|
{{- partial "comments.html" . }}
|
||||||
{{- end }}
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{{- end }}{{/* end main */}}
|
{{- end }}{{/* end main */}}
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
{{- /* Comments area start */ -}}
|
{{- /* Comments area start */ -}}
|
||||||
{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}}
|
{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}}
|
||||||
|
<div id="gitalk-container"></div>
|
||||||
|
<script>
|
||||||
|
const gitalk = new Gitalk({
|
||||||
|
clientID: '402f41759b3537b6c752',
|
||||||
|
clientSecret: 'd9558424431bfc3ee18d4b6c6ce7594ef682a701',
|
||||||
|
repo: 'liuchang0812.github.io', // The repository of store comments,
|
||||||
|
owner: 'liuchang0812',
|
||||||
|
admin: ['liuchang0812'],
|
||||||
|
id: location.pathname, // Ensure uniqueness and length less than 50
|
||||||
|
distractionFreeMode: false // Facebook-like distraction free mode
|
||||||
|
})
|
||||||
|
|
||||||
|
gitalk.render('gitalk-container')
|
||||||
|
</script>
|
||||||
{{- /* Comments area end */ -}}
|
{{- /* Comments area end */ -}}
|
||||||
|
@ -115,6 +115,9 @@
|
|||||||
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" />
|
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" />
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
<noscript>
|
<noscript>
|
||||||
<style>
|
<style>
|
||||||
#theme-toggle,
|
#theme-toggle,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user