1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 06:38:30 -04:00

don't preconnect to utteranc.es endpoints if comments disabled

This commit is contained in:
Jake Jarvis 2020-04-13 10:42:32 -04:00
parent 124d55a99e
commit 61741df3f7
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39

View File

@ -1,6 +1,6 @@
{{ if eq hugo.Environment "production" }}
<link rel="preconnect" href="https://s.jarv.is" crossorigin="anonymous">
{{ if and .IsPage (eq .Type "notes") }}
{{ if and .IsPage (and (eq .Type "notes") (ne .Params.comments false)) }}
<link rel="preconnect" href="https://utteranc.es" crossorigin="anonymous">
<link rel="preconnect" href="https://api.utteranc.es" crossorigin="anonymous">
<link rel="preconnect" href="https://api.github.com" crossorigin="anonymous">