diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9b0a398..c71f66d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -46,7 +46,7 @@ {{- if not (.Param "noComments") }} - {{- partial "comments.html" . }} + {{- partial "comments.html" . }} {{- end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 918451a..a07744a 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,3 +1,9 @@ -{{- /* Comments area start */ -}} -{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} -{{- /* Comments area end */ -}} +{{- /* You can add your own layouts/comments.html to override this file */ -}} + +{{- with site.Params.commentSystem.disqus -}} + {{- partial "disqus.html" . }} +{{- end -}} + +{{- with site.Params.commentSystem.telegramWidget -}} + {{- partial "telegram_widget.html" . }} +{{- end -}} diff --git a/layouts/partials/comments_js.html b/layouts/partials/comments_js.html deleted file mode 100644 index cca3404..0000000 --- a/layouts/partials/comments_js.html +++ /dev/null @@ -1,3 +0,0 @@ -{{- /* Comments js area start */ -}} -{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} -{{- /* Comments js area end */ -}} diff --git a/layouts/partials/comments_script.html b/layouts/partials/comments_script.html new file mode 100644 index 0000000..8663497 --- /dev/null +++ b/layouts/partials/comments_script.html @@ -0,0 +1,5 @@ +{{- /* You can add your own layouts/comments_script.html to override this file */ -}} + +{{- with site.Params.commentSystem.disqus -}} + {{ partial "disqus_script.html" . }} +{{- end -}} diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html new file mode 100644 index 0000000..dc86fc2 --- /dev/null +++ b/layouts/partials/disqus.html @@ -0,0 +1,3 @@ +
+
+
diff --git a/layouts/partials/disqus_script.html b/layouts/partials/disqus_script.html new file mode 100644 index 0000000..4840d14 --- /dev/null +++ b/layouts/partials/disqus_script.html @@ -0,0 +1,27 @@ + diff --git a/layouts/partials/page_footer.html b/layouts/partials/page_footer.html index 589292b..2d0dd2a 100644 --- a/layouts/partials/page_footer.html +++ b/layouts/partials/page_footer.html @@ -126,5 +126,5 @@ {{- end }} {{- if not (.Param "noComments") }} - {{- partial "comments_js.html" . }} + {{- partial "comments_script.html" . }} {{ end }} diff --git a/layouts/partials/telegram_widget.html b/layouts/partials/telegram_widget.html new file mode 100644 index 0000000..84db442 --- /dev/null +++ b/layouts/partials/telegram_widget.html @@ -0,0 +1,7 @@ +{{- with site.Params.commentSystem.telegramWidget }} + +{{- end }}