1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 04:35:31 -04:00

enable comments via utteranc.es

This commit is contained in:
2020-03-17 19:32:27 -04:00
parent db6952a443
commit d5b5a71078
6 changed files with 33 additions and 2 deletions

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>