Configure google analytics

This commit is contained in:
Correl Roush 2019-06-27 02:01:38 -04:00
parent 3cad7b0200
commit c66f121f8c
2 changed files with 4 additions and 1 deletions

View file

@ -1,6 +1,7 @@
baseURL = "http://example.org/" baseURL = "http://example.org/"
languageCode = "en-us" languageCode = "en-us"
title = "Projects and Coding Adventures" title = "Projects and Coding Adventures"
googleAnalytics = "UA-429788-2"
disqusShortname = "correl" disqusShortname = "correl"
theme = "hugo-theme-m10c" theme = "hugo-theme-m10c"
staticDir = ["static"] staticDir = ["static"]

View file

@ -10,7 +10,9 @@
{{ $style := resources.Get "css/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint -}} {{ $style := resources.Get "css/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" /> <link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ if not .Site.IsServer }}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ template "_internal/twitter_cards.html" . }} {{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }} {{ template "_internal/opengraph.html" . }}