1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 09:18:28 -04:00

enable comments via utteranc.es

This commit is contained in:
Jake Jarvis 2020-03-17 19:32:27 -04:00
parent db6952a443
commit d5b5a71078
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
6 changed files with 33 additions and 2 deletions

View File

@ -50,6 +50,16 @@ main#single {
}
}
}
div#comments {
margin-top: 1.5em;
padding-top: 0.5em;
border-top: 2px solid $color-light;
div.utterances {
max-width: unset;
}
}
}

View File

@ -32,6 +32,7 @@ disableAliases = true
license = "CC-BY-4.0"
licenseFull = "Creative Commons Attribution 4.0 International"
licenseURL = "https://creativecommons.org/licenses/by/4.0/"
utterancesRepo = "jakejarvis/jarv.is"
[author]
name = "Jake Jarvis"

View File

@ -17,6 +17,12 @@
<div id="content">
{{ .Content }}
</div>
{{ if eq hugo.Environment "production" }}
<div id="comments">
{{ partial "scripts/utterances" . }}
</div>
{{ end }}
</article>
</main>
{{ end }}

View File

@ -2,7 +2,7 @@
{{ partial "functions/social-images" . -}}
{{ partial "head/open-graph" . -}}
{{ partialCached "head/mobile" . -}}
{{ partialCached "head/preload" . -}}
{{ partial "head/preload" . -}}
{{ partialCached "head/styles" . -}}
{{ partialCached "head/favicons" (dict "pngSizes" "192 48 32 16" "icoSizes" "16 32 48") -}}
<link rel="manifest" href="{{ "site.webmanifest" | absURL }}">

View File

@ -1,4 +1,10 @@
{{ if eq hugo.Environment "production" }}<link rel="preconnect" href="https://s.jarv.is">{{ end }}
{{ if eq hugo.Environment "production" }}
<link rel="preconnect" href="https://s.jarv.is">
{{ if and .IsPage (eq .Type "notes") }}
<link rel="preconnect" href="https://utteranc.es">
{{ end }}
{{ end }}
<link rel="preload" href="{{ "fonts/inter-regular-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/inter-medium-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/inter-bold-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>

View File

@ -0,0 +1,8 @@
<script src="https://utteranc.es/client.js"
repo="{{ .Site.Params.utterancesRepo }}"
issue-term="og:title"
label="comments"
theme="github-light"
crossorigin="anonymous"
async defer>
</script>