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
|
- Mobile support
|
||||||
- Google Analytics
|
- Google Analytics
|
||||||
- Disqus
|
- Disqus
|
||||||
|
- Utteranc.es
|
||||||
- RSS feeds
|
- RSS feeds
|
||||||
- Translations (en, ru, fr, pl)
|
- Translations (en, ru, fr, pl)
|
||||||
- Custom CSS/JS
|
- Custom CSS/JS
|
||||||
@ -72,6 +73,11 @@ params:
|
|||||||
paginationSinglePost: true
|
paginationSinglePost: true
|
||||||
style: light-without-switcher
|
style: light-without-switcher
|
||||||
readMore: false
|
readMore: false
|
||||||
|
# utteranc.es support
|
||||||
|
utterancesRepo: "" # mandatory
|
||||||
|
utterancesTheme: "" # optional
|
||||||
|
utterancesIssue: "" # optional
|
||||||
|
utterancesLabel: "" # optional
|
||||||
webmentions:
|
webmentions:
|
||||||
login: hugo-theme-anubis
|
login: hugo-theme-anubis
|
||||||
pingback: true
|
pingback: true
|
||||||
|
@ -18,6 +18,12 @@ googleAnalytics = ""
|
|||||||
style = "light-without-switcher"
|
style = "light-without-switcher"
|
||||||
readMore = false
|
readMore = false
|
||||||
|
|
||||||
|
# utteranc.es support
|
||||||
|
utterancesRepo = "" # mandatory
|
||||||
|
utterancesTheme = "" # optional
|
||||||
|
utterancesIssue = "" # optional
|
||||||
|
utterancesLabel = "" # optional
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
|
@ -19,6 +19,12 @@ googleAnalytics = ""
|
|||||||
style = "light-without-switcher"
|
style = "light-without-switcher"
|
||||||
readMore = false
|
readMore = false
|
||||||
|
|
||||||
|
# utteranc.es support
|
||||||
|
utterancesRepo = "" # mandatory
|
||||||
|
utterancesTheme = "" # optional
|
||||||
|
utterancesIssue = "" # optional
|
||||||
|
utterancesLabel = "" # optional
|
||||||
|
|
||||||
[languages.en]
|
[languages.en]
|
||||||
languageName = "English"
|
languageName = "English"
|
||||||
|
|
||||||
|
@ -25,4 +25,8 @@
|
|||||||
{{ template "_internal/disqus.html" . }}
|
{{ template "_internal/disqus.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.UtterancesRepo }}
|
||||||
|
{{ partial "utterances.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ 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