1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 14:46:37 -04:00

update meta pages & robots.txt

This commit is contained in:
2020-06-29 11:43:38 -04:00
parent 99d13da0c7
commit 84add157d3
9 changed files with 23 additions and 38 deletions

View File

@ -1,11 +1,11 @@
{{/* only parse and append analytics script on production site */}}
{{- $includeAnalytics := eq hugo.Environment "production" -}}
{{- $darkmode := resources.Get "js/dark-mode.js" | resources.ExecuteAsTemplate "js/dark-mode.js" . -}}
{{- $twemoji := resources.Get "js/vendor/twemoji.js" | resources.ExecuteAsTemplate "js/vendor/twemoji.js" . -}}
{{- $bundle := slice $darkmode $twemoji -}}
{{/* only parse and append analytics script on production site */}}
{{- $includeAnalytics := eq hugo.Environment "production" -}}
{{- if $includeAnalytics }}
{{- $analytics := resources.Get "js/analytics.js" | resources.ExecuteAsTemplate "js/analytics.js" . }}
{{- $bundle = slice $darkmode $twemoji $analytics }}
@ -13,8 +13,3 @@
{{- $js := $bundle | resources.Concat "/js/app.js" -}}
<script async defer src="{{ $js.Permalink }}"></script>
{{/* proxy to simple analytics noscript on production */}}
{{- if $includeAnalytics }}
<noscript><img src="{{ "sa/manual.gif" | absURL }}" alt=""></noscript>
{{ end -}}