diff options
author | amzrk2 | 2020-04-14 11:01:40 +0800 |
---|---|---|
committer | amzrk2 | 2020-04-14 11:01:40 +0800 |
commit | b2343edc52c1d6dc9b07accba756a08aba5e4e4f (patch) | |
tree | 85a8ef304415f351104bd4e1f1200c5e5025f17a | |
parent | f5be5e6cbed53afdc2e6ea73d3da9d5bb0057bec (diff) | |
download | hugo-theme-fuji-b2343edc52c1d6dc9b07accba756a08aba5e4e4f.tar.gz hugo-theme-fuji-b2343edc52c1d6dc9b07accba756a08aba5e4e4f.tar.bz2 hugo-theme-fuji-b2343edc52c1d6dc9b07accba756a08aba5e4e4f.zip |
utterances support
-rw-r--r-- | exampleSite/config.toml | 7 | ||||
-rw-r--r-- | layouts/_default/single.html | 1 | ||||
-rw-r--r-- | layouts/partials/comment-utterances.html | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9d0f65c..6dc23e1 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -18,6 +18,13 @@ paginate = 10 # Bangumi image chart id # bgmImageChart = "000000" + # Comments + # utterances, see: https://utteranc.es/ + cdnUtterancesJS = "https://utteranc.es/client.js" + utterancesRepo = "[ENTER REPO HERE]" + utterancesIssueTerm = "pathname" + utterancesTheme = "github-light" + # Custom lazyload thumbnail cdnLazyloadSRC = "https://cdn.jsdelivr.net/gh/amzrk2/poal-jsdelivr/lazyload/dsr_loading.svg" # Custom css & js CDN diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 36695be..b21c511 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,6 +14,7 @@ {{ .Content }} </div> </article> + {{ partial "comment-utterances.html" . }} </div> <!-- sidebar --> <div class="col-md-3 col-12 float-left" id="sidebar"> diff --git a/layouts/partials/comment-utterances.html b/layouts/partials/comment-utterances.html new file mode 100644 index 0000000..02575eb --- /dev/null +++ b/layouts/partials/comment-utterances.html @@ -0,0 +1,5 @@ +<div id="post-comment"> + <script src="{{ .Site.Params.cdnUtterancesJS }}" repo="{{ .Site.Params.utterancesRepo }}" + issue-term="{{ .Site.Params.utterancesIssueTerm }}" theme="{{ .Site.Params.utterancesTheme }}" + crossorigin="anonymous" async></script> +</div>
\ No newline at end of file |