Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wangchucheng/hugo-eureka.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/comment/valine.html')
-rw-r--r--layouts/partials/comment/valine.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/layouts/partials/comment/valine.html b/layouts/partials/comment/valine.html
new file mode 100644
index 0000000..7a5a7ce
--- /dev/null
+++ b/layouts/partials/comment/valine.html
@@ -0,0 +1,14 @@
+<div id="valine-comments" class="mt-4"></div>
+{{- $assets := .Site.Data.assets }}
+<script defer src="{{ printf $assets.valine.js.url $assets.valine.version }}" {{ with $assets.valine.js.sri }}
+ integrity="{{ . }}" {{ end }} crossorigin></script>
+{{- with .Site.Params.comment.valine }}
+<script>
+ document.addEventListener("DOMContentLoaded", function () {
+ new Valine({
+ el: "#valine-comments",
+ {{- partial "utils/get-js-configs" . | safeJS }}
+ })
+ });
+</script>
+{{- end }} \ No newline at end of file