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

clean up redirects/404s & other random housekeeping

This commit is contained in:
2020-06-02 14:00:40 -04:00
parent 23eabb48c0
commit a6cb95c0d7
15 changed files with 46 additions and 32 deletions

View File

@@ -1,7 +1,7 @@
<footer>
<div class="row">
<div id="copyright">Content <a class="no-underline" href="{{ "license/" | absURL }}"{{ with .Site.Params.licenseFull }} title="{{ . }}"{{ end }}>licensed under {{ .Site.Params.license }}</a>, {{ with .Site.Params.copyrightFirstYear }}<a class="no-underline" href="{{ "previously/" | absURL }}" title="Previously on...">{{ . }} &ndash;</a>{{ end }} {{ now.Format "2006" }}.</div>
<div id="ie"><a class="no-underline" href="https://y2k.lol/" title="Made for Internet Explorer&reg;" target="_blank" rel="noopener"><img src="{{ "img/ie.gif" | absURL }}" width="88" alt="Made for Internet Explorer&reg;"></a></div>
<div id="y2k"><a class="no-underline" href="https://y2k.lol/" title="Made for Internet Explorer&reg;" target="_blank" rel="noopener"><img src="{{ "img/ie.gif" | absURL }}" width="88" alt="Made for Internet Explorer&reg;"></a></div>
<div id="poweredby">
<a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener">Made with <span class="beat">&#x2764;</span> and Hugo.</a>
{{ with .Site.Params.github }}<a class="no-underline" href="https://github.com/{{ . }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener">View source.</a>{{ end }}

View File

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

View File

@@ -1 +1,2 @@
{{/* optional feature, see: https://docs.simpleanalytics.com/events */}}
<script>window.sa_event=window.sa_event||function(){a=[].slice.call(arguments);sa_event.q?sa_event.q.push(a):sa_event.q=[a]};</script>