diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 595cde4..37c3712 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -130,4 +130,9 @@ copyright = "This work is licensed under a Creative Commons Attribution-NonComme url = "cover.png" width = 800 height = 600 - + +[params.gitalk] +owner = "" +repo = "" +clientId = "" +clientSecret = "" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0dcadf8..a569fcf 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -103,9 +103,7 @@
{{ if ( .Params.showComments | default true ) }} - {{ if ne .Site.DisqusShortname "" }} - {{ template "_internal/disqus.html" . }} - {{ end }} + {{ partial "comments.html" . }} {{ end }}
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 0000000..2bce448 --- /dev/null +++ b/layouts/partials/comments.html @@ -0,0 +1,41 @@ +{{ if and .IsPage (ne .Params.comment false) -}} + + {{- if .Site.DisqusShortname -}} +
+ + + {{- end -}} + + + {{- if .Site.Params.gitalk.owner -}} +
+ + + + + {{- end }} + +{{- end }} \ No newline at end of file