Twikoo Module

This module add support for Twikoo, a simple, free and self-hosted comments system.

Module
github.com/hugomods/twikoo
GitHub Stars Used By Used By Used By Used By

Usage

Generate the Comments Container

1<div id="twikoo-comments"></div>

Import the Script

1{{ partialCached "twikoo/script" . }}

Or pass the specified options.

1{{- $opts := dict "env_id" "" }}
2{{ partialCached "twikoo/script-with-options" $opts }}

Site Parameters

NameTypeRequiredDefaultDescription
env_idstringY-The Tencent Cloud environment ID or self-hosted endpoint.
elstringY#twikoo-commentsThe HTML element to put comments in.
js_urlstringYhttps://cdn.staticfile.org/twikoo/1.6.16/twikoo.all.min.jsThe script URL.
regionstring--The Tencent Cloud region, such as ap-shanghai, ap-guangzhou.

hugo.yaml

1params:
2  twikoo:
3    el: '#twikoo-comments'
4    env_id: ""
5    js_url: https://cdn.staticfile.org/twikoo/1.6.16/twikoo.all.min.js
6    region: ""

hugo.toml

1[params]
2  [params.twikoo]
3    el = '#twikoo-comments'
4    env_id = ''
5    js_url = 'https://cdn.staticfile.org/twikoo/1.6.16/twikoo.all.min.js'
6    region = ''

hugo.json

 1{
 2   "params": {
 3      "twikoo": {
 4         "el": "#twikoo-comments",
 5         "env_id": "",
 6         "js_url": "https://cdn.staticfile.org/twikoo/1.6.16/twikoo.all.min.js",
 7         "region": ""
 8      }
 9   }
10}