mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
Add support for comentario.
This commit is contained in:
parent
839fbd0ecb
commit
0b123a6b54
3 changed files with 38 additions and 0 deletions
12
config.yaml
12
config.yaml
|
@ -117,6 +117,18 @@ params:
|
|||
host:
|
||||
id:
|
||||
|
||||
# Comentario client configuration see: https://docs.comentario.app/en/configuration/embedding/comments-tag/
|
||||
comentario:
|
||||
url:
|
||||
autoInit:
|
||||
autoNonInteractiveSso:
|
||||
cssOverride:
|
||||
lang:
|
||||
liveUpdate:
|
||||
maxLevel:
|
||||
noFonts:
|
||||
theme:
|
||||
|
||||
widgets:
|
||||
homepage: []
|
||||
page: []
|
||||
|
|
|
@ -166,6 +166,19 @@ params:
|
|||
cusdis:
|
||||
host:
|
||||
id:
|
||||
|
||||
# Comentario client configuration see: https://docs.comentario.app/en/configuration/embedding/comments-tag/
|
||||
comentario:
|
||||
url:
|
||||
autoInit:
|
||||
autoNonInteractiveSso:
|
||||
cssOverride:
|
||||
lang:
|
||||
liveUpdate:
|
||||
maxLevel:
|
||||
noFonts:
|
||||
theme:
|
||||
|
||||
widgets:
|
||||
homepage:
|
||||
- type: search
|
||||
|
|
13
layouts/partials/comments/provider/comentario.html
Normal file
13
layouts/partials/comments/provider/comentario.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<script defer src="{{ .Site.Params.comments.comentario.url }}/comentario.js"></script>
|
||||
<comentario-comments auto-init="{{ .Site.Params.comments.comentario.autoInit }}"
|
||||
auto-non-interactive-sso="{{ .Site.Params.comments.comentario.autoNonInteractiveSSO }}"
|
||||
css-override="{{ .Site.Params.comments.comentario.cssOverride }}" lang="{{ .Site.Params.comments.comentario.lang }}"
|
||||
live-update="{{ .Site.Params.comments.comentario.liveUpdate }}"
|
||||
max-level="{{ .Site.Params.comments.comentario.maxLevel }}"
|
||||
no-fonts="{{ .Site.Params.comments.comentario.noFonts }}"
|
||||
theme="{{.Site.Params.comments.comentario.theme}}"></comentario-comments>
|
||||
<script>
|
||||
window.addEventListener('onColorSchemeChange', (e) => {
|
||||
document.querySelector('comentario-comments').setAttribute('theme', e.detail);
|
||||
})
|
||||
</script>
|
Loading…
Reference in a new issue