1
0
mirror of https://github.com/danbee/danbarber.me.hugo.git synced 2025-03-04 08:59:18 +00:00

Compare commits

..

4 Commits

Author SHA1 Message Date
f1091202a7 We missed all these redirects! 2019-10-27 18:53:19 -04:00
05c2778607 Add analytics 2019-10-27 18:46:50 -04:00
79da45397a Couple of fixes 2019-10-27 14:48:46 -04:00
1540aec207 Add OG data 2019-10-27 13:58:49 -04:00
401 changed files with 177 additions and 1 deletions

View File

@ -10,5 +10,7 @@
{{ end }}
</main>
{{ partial "footer.html" . }}
{{ partial "analytics.html" . }}
</body>
</html>

View File

@ -0,0 +1,16 @@
{{ if eq (getenv "CONTEXT") "production" }}
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, 'https://stats.danbarber.me/tracker.js', 'fathom');
fathom('trackPageview');
</script>
<!-- / Fathom -->
{{ end }}

View File

@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="https://cloud.typography.com/7434852/6717812/css/fonts.css" />
{{ $sass := resources.Get "sass/main.scss" }}
{{ $style := $sass | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
<!-- Links -->
{{ range .AlternativeOutputFormats -}}
@ -40,3 +40,19 @@
<link href="https://github.com/danbee" rel="me">
<link href="https://www.instagram.com/danbee/" rel="me">
<link href="/danbarber.gpg" rel="pgpkey">
{{ if .Title }}
<meta property="og:title" content="{{ .Title }} {{ .Site.Title }}">
{{ else }}
<meta property="og:title" content="{{ .Site.Title }}">
{{ end }}
<meta property="og:type" content="article">
<meta property="og:url" content="{{ .Permalink }}">
{{ if .Params.image }}
{{ $imageSize := default "600x600" }}
{{ $src := .Page.Resources.GetMatch (.Params.image) }}
{{ $image := $src.Fit $imageSize }}
<meta property="og:image" content="{{ $image.RelPermalink }}">
{{ end }}
<meta property="og:description" content="{{ .Summary }}">
<meta property="og:locale" content="en_UK">

Some files were not shown because too many files have changed in this diff Show More