split isso parameters in mandatory and optional and add them to the config in the README

This commit is contained in:
Jan Fader 2021-12-23 20:02:36 +01:00
parent 4dcd78397f
commit 33a9a5e367
No known key found for this signature in database
GPG Key ID: 1A6BDEFB0E27FA44
2 changed files with 23 additions and 5 deletions

View File

@ -87,6 +87,19 @@ params:
utterancesTheme: "" # optional utterancesTheme: "" # optional
utterancesIssue: "" # optional utterancesIssue: "" # optional
utterancesLabel: "" # optional utterancesLabel: "" # optional
# isso support
isso:
enabled: true # mandatory
data: "https://comments.example.com/" # mandatory
jsLocation: "https://comments.example.com/js/embed.min.js" # mandatory
css: true # optional
lang: "de" # optional
replyToSelf: true # mandatory
requireAuthor: true # mandatory
requireEmail: true # mandatory
id: "thread-id" # optional
avatar: true # optional
avatar-bg: "#f0f0f0" # optional
webmentions: webmentions:
url: https://yourdomain.com/webemntions/receive url: https://yourdomain.com/webemntions/receive
login: hugo-theme-anubis login: hugo-theme-anubis

View File

@ -1,14 +1,19 @@
{{ $lang := .Site.Params.isso.lang | default "en" }}
{{ $css := .Site.Params.isso.css | default "true" }}
{{ $id := .Site.Params.isso.id | default "true" }}
{{ $avatar := .Site.Params.isso.avatar | default "true" }}
{{ $avatarbg := .Site.Params.isso.avatarbg | default "#f0f0f0" }}
<article class="post"> <article class="post">
<script <script
data-isso="{{ .Site.Params.isso.data }}" data-isso="{{ .Site.Params.isso.data }}"
data-isso-id="{{ .Site.Params.isso.id}}" data-isso-id="{{ $id }}"
data-isso-css="{{ .Site.Params.isso.css }}" data-isso-css="{{ $css }}"
data-isso-lang="{{ .Site.Params.isso.lang }}" data-isso-lang="{{ $lang }}"
data-isso-reply-to-self="{{ .Site.Params.isso.replyToSelf }}" data-isso-reply-to-self="{{ .Site.Params.isso.replyToSelf }}"
data-isso-require-author="{{ .Site.Params.isso.requireAuthor }}" data-isso-require-author="{{ .Site.Params.isso.requireAuthor }}"
data-isso-require-email="{{ .Site.Params.isso.requireEmail }}" data-isso-require-email="{{ .Site.Params.isso.requireEmail }}"
data-isso-avatar="{{ .Site.Params.isso.avatar }}" data-isso-avatar="{{ $avatar }}"
data-isso-avatar-bg="{{ .Site.Params.isso.avatarBg }}" data-isso-avatar-bg="{{ $avatarbg }}"
src="{{ .Site.Params.isso.jsLocation }}"> src="{{ .Site.Params.isso.jsLocation }}">
</script> </script>
<noscript>Please enable JavaScript to view the comments powered by <a href="https://posativ.org/isso/">Isso</a>.</noscript> <noscript>Please enable JavaScript to view the comments powered by <a href="https://posativ.org/isso/">Isso</a>.</noscript>