Merge pull request #76 from leonhfr/feature/utterances
uteranc.es support
This commit is contained in:
commit
21306c4ab5
@ -14,6 +14,7 @@ Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/).
|
||||
- Mobile support
|
||||
- Google Analytics
|
||||
- Disqus
|
||||
- Utteranc.es
|
||||
- RSS feeds
|
||||
- Translations (en, ru, fr, pl)
|
||||
- Custom CSS/JS
|
||||
@ -72,6 +73,11 @@ params:
|
||||
paginationSinglePost: true
|
||||
style: light-without-switcher
|
||||
readMore: false
|
||||
# utteranc.es support
|
||||
utterancesRepo: "" # mandatory
|
||||
utterancesTheme: "" # optional
|
||||
utterancesIssue: "" # optional
|
||||
utterancesLabel: "" # optional
|
||||
webmentions:
|
||||
login: hugo-theme-anubis
|
||||
pingback: true
|
||||
|
@ -18,6 +18,12 @@ googleAnalytics = ""
|
||||
style = "light-without-switcher"
|
||||
readMore = false
|
||||
|
||||
# utteranc.es support
|
||||
utterancesRepo = "" # mandatory
|
||||
utterancesTheme = "" # optional
|
||||
utterancesIssue = "" # optional
|
||||
utterancesLabel = "" # optional
|
||||
|
||||
[menu]
|
||||
|
||||
[[menu.main]]
|
||||
|
@ -19,6 +19,12 @@ googleAnalytics = ""
|
||||
style = "light-without-switcher"
|
||||
readMore = false
|
||||
|
||||
# utteranc.es support
|
||||
utterancesRepo = "" # mandatory
|
||||
utterancesTheme = "" # optional
|
||||
utterancesIssue = "" # optional
|
||||
utterancesLabel = "" # optional
|
||||
|
||||
[languages.en]
|
||||
languageName = "English"
|
||||
|
||||
|
@ -25,4 +25,8 @@
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.UtterancesRepo }}
|
||||
{{ partial "utterances.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
11
layouts/partials/utterances.html
Normal file
11
layouts/partials/utterances.html
Normal file
@ -0,0 +1,11 @@
|
||||
{{ $theme := .Site.Params.UtterancesTheme | default "github-light" }}
|
||||
{{ $label := .Site.Params.UtterancesLabel | default "" }}
|
||||
{{ $issue := .Site.Params.UtterancesIssue | default "url" }}
|
||||
<script src="https://utteranc.es/client.js"
|
||||
repo="{{- .Site.Params.UtterancesRepo -}}"
|
||||
theme="{{ $theme }}"
|
||||
label="{{ $label }}"
|
||||
issue-term="{{ $issue }}"
|
||||
crossorigin="anonymous"
|
||||
async>
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user