Added the ability to use google analytics using Hugo's internal template. Added a sample config and instructions to config.yaml for the example site and added in a link for the google analytics internal template for the navbar partial per https://gohugo.io/templates/internal/
This commit is contained in:
@@ -2,6 +2,7 @@ baseURL: http://something-fresh.org/
|
|||||||
languageCode: en-us
|
languageCode: en-us
|
||||||
title: Hugo Fresh Theme
|
title: Hugo Fresh Theme
|
||||||
theme: hugo-fresh
|
theme: hugo-fresh
|
||||||
|
googleAnalytics: #Put in your tracking code without quotes like this: UA-XXXXXX...
|
||||||
|
|
||||||
params:
|
params:
|
||||||
navbarlogo:
|
navbarlogo:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{ template "_internal/google_analytics_async.html" . }}
|
||||||
{{- $navbar := .Site.Params.navbar }}
|
{{- $navbar := .Site.Params.navbar }}
|
||||||
{{- $sidebarVisible := .Site.Params.sidebar }}
|
{{- $sidebarVisible := .Site.Params.sidebar }}
|
||||||
{{ if .Params.sidebar }}
|
{{ if .Params.sidebar }}
|
||||||
|
|||||||
Reference in New Issue
Block a user