diff options
author | Olivier Roques <olivier@oroques.dev> | 2020-11-24 10:50:26 +0100 |
---|---|---|
committer | Olivier Roques <olivier@oroques.dev> | 2020-11-24 10:50:34 +0100 |
commit | b522ff81e0b5156c04ac85fe7ad36210666a9949 (patch) | |
tree | aaed558577f4f81898c7db2de4783045fd79247d | |
parent | 7978d5fa5085ba1930fb85a8735ad24d919d9961 (diff) |
Add Google Analytics option to example site
-rw-r--r-- | exampleSite/config.toml | 3 | ||||
-rw-r--r-- | layouts/partials/head.html | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3541a4d..a78b5d6 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -3,7 +3,8 @@ baseURL = "https://example.com" theme = "researcher" disableKinds = ["taxonomy", "term"] enableEmoji = true -math = false # enable KaTeX (https://katex.org/) globally +math = false # enable KaTeX (https://katex.org/) globally +googleAnalytics = "" # add your tracking id [params] author = "Olivier Roques" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1260007..bc0864a 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -6,10 +6,6 @@ <meta name="description" content="{{ .Site.Params.description }}"> <meta name="author" content='{{ .Site.Params.author }}'> - {{ if not .Site.IsServer }} - {{ template "_internal/google_analytics.html" . }} - {{ end }} - <link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous"> @@ -19,4 +15,8 @@ {{ with .Site.Params.favicon }} <link rel="icon" type="image/ico" href="{{ . | absURL }}"> {{ end }} + + {{ if not .Site.IsServer }} + {{ template "_internal/google_analytics.html" . }} + {{ end }} </head> |