mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-09 17:42:19 +00:00
add comments via utterances
This commit is contained in:
parent
eca1287520
commit
9dd3a8ac58
4 changed files with 28 additions and 0 deletions
|
@ -4,6 +4,12 @@ description = "while (true) { bugs++; }"
|
|||
mainSections = ["posts"]
|
||||
fallBackOgImage = "images/broken-computer.svg"
|
||||
|
||||
# Comments
|
||||
comments = true
|
||||
utterancesRepo = "jbowdre/runtimeterror"
|
||||
utterancesIssueTerm = "title"
|
||||
utterancesTheme = "gruvbox-dark"
|
||||
|
||||
[theme]
|
||||
palette = "runtimeterror"
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ date = "2019-02-28"
|
|||
aliases = ["about-us", "about-hugo", "contact"]
|
||||
author = "Hugo Authors"
|
||||
timeless = "true"
|
||||
comments = false
|
||||
+++
|
||||
|
||||
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
||||
|
|
|
@ -20,6 +20,15 @@
|
|||
<div class="content__body">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{- $showComments := true }}
|
||||
{{- if eq .Site.Params.comments false }}
|
||||
{{- $showComments = false }}
|
||||
{{- else if eq .Params.comments false }}
|
||||
{{- $showComments = false }}
|
||||
{{- end }}
|
||||
{{- if ne $showComments false }}
|
||||
{{- partial "comments" . }}
|
||||
{{- end }}
|
||||
<footer class="content__footer"></footer>
|
||||
{{ end }}
|
||||
|
||||
|
|
12
layouts/partials/comments.html
Normal file
12
layouts/partials/comments.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ if .Site.Params.utterancesRepo }}
|
||||
<br>
|
||||
<div class="post_comments">
|
||||
<script src="https://utteranc.es/client.js"
|
||||
repo="{{.Site.Params.utterancesRepo}}"
|
||||
issue-term="{{.Site.Params.utterancesIssueTerm | default "pathname"}}"
|
||||
theme="{{.Site.Params.utterancesTheme | default "github-dark-orange"}}"
|
||||
crossorigin="anonymous"
|
||||
async>
|
||||
</script>
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Reference in a new issue