diff options
author | Herbert <30955264+HerbertHe@users.noreply.github.com> | 2021-04-18 20:40:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-18 20:40:10 +0300 |
commit | 1762613dfb06a9f2fb0958b4550234ea7193b772 (patch) | |
tree | 012b91f92ed81ceff3d57779bda9edbe1ea118ae /layouts | |
parent | 177e4b19c294652a163cf93d35fdc5ae91acf3e3 (diff) |
feat: support Valine (#79)
* feat: support valine
* ui: impove valine UI
* feat: support valine options
* fix: remove valine serverURLs option
* refactor: load params in a more flexible way
* feat: custom editThisPage repo branch
* cRevert "feat: custom editThisPage repo branch"
This reverts commit 36923ac30de6c3a690fa7407e534c5395bafcb18.
Co-authored-by: Wang Chucheng <me@wangchucheng.com>
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/comment/valine.html | 14 |
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 |