Add support for Utterances comments
This commit is contained in:
parent
d62ce18b7b
commit
c5139fca26
4 changed files with 17 additions and 1 deletions
|
@ -68,6 +68,10 @@ __`Hyde-hyde`__ essentially inherits most of Hyde's [options](https://github.com
|
||||||
|
|
||||||
* `GraphCommentId = "your-graphcomment-id"`: to use [GraphComment](https://graphcomment.com) instead of the built-in [Disqus](https://disqus.com). This option should be used exclusively with `disqusShortname = "disqus-shortname"`.
|
* `GraphCommentId = "your-graphcomment-id"`: to use [GraphComment](https://graphcomment.com) instead of the built-in [Disqus](https://disqus.com). This option should be used exclusively with `disqusShortname = "disqus-shortname"`.
|
||||||
|
|
||||||
|
* `UtterancesRepo = "your-repo-name"`: to use [Utterances](https://utteranc.es/) instead of the built-in [Disqus](https://disqus.com). This option should be used exclusively with `disqusShortname = "disqus-shortname"`.
|
||||||
|
* `UtterancesIssueTerm = "pathname"` Method for Utterances to match issue's to posts (pathname, url, title, og:title)
|
||||||
|
* `UtterancesIssueTheme = "github-light"` Theme for Utterances (github-light, github-dark)
|
||||||
|
|
||||||
* `[params.social]`: in this section, you can set many social identities such as Twitter, Facebook, Github, Bitbucket, Gitlab, Instagram, LinkedIn, StackOverflow, Medium, Xing, Keybase.
|
* `[params.social]`: in this section, you can set many social identities such as Twitter, Facebook, Github, Bitbucket, Gitlab, Instagram, LinkedIn, StackOverflow, Medium, Xing, Keybase.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
|
|
|
@ -23,8 +23,11 @@ theme = "hyde-hyde"
|
||||||
dateformat = "Jan 2, 2006"
|
dateformat = "Jan 2, 2006"
|
||||||
highlightjs = true
|
highlightjs = true
|
||||||
highlightjsstyle = "github"
|
highlightjsstyle = "github"
|
||||||
# please choose either GraphComment or Disqus
|
# please choose either GraphComment or Disqus or Utterances
|
||||||
#GraphCommentId = "..."
|
#GraphCommentId = "..."
|
||||||
|
#UtterancesRepo = "..." # https://utteranc.es/
|
||||||
|
#UtterancesIssueTerm = "..." # pathname, url, title, og:title
|
||||||
|
#UtterancesIssueTheme = "..." # github-light or github-dark
|
||||||
|
|
||||||
# Table of contents
|
# Table of contents
|
||||||
#toc = none, "hugo", or "tocbot"
|
#toc = none, "hugo", or "tocbot"
|
||||||
|
|
7
layouts/partials/page-single/comment/utterances.html
Normal file
7
layouts/partials/page-single/comment/utterances.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<script src="https://utteranc.es/client.js"
|
||||||
|
repo="{{ .Site.Params.UtterancesRepo }}"
|
||||||
|
issue-term="{{ .Site.Params.UtterancesIssueTerm }}"
|
||||||
|
theme="{{ .Site.Params.UtterancesIssueTheme }}"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
async>
|
||||||
|
</script>
|
|
@ -3,5 +3,7 @@
|
||||||
{{ partial "page-single/comment/disqus.html" . }}
|
{{ partial "page-single/comment/disqus.html" . }}
|
||||||
{{ else if .Site.Params.GraphCommentId }}
|
{{ else if .Site.Params.GraphCommentId }}
|
||||||
{{ partial "page-single/comment/graphcomment.html" . }}
|
{{ partial "page-single/comment/graphcomment.html" . }}
|
||||||
|
{{ else if .Site.Params.UtterancesRepo }}
|
||||||
|
{{ partial "page-single/comment/utterances.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue