summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author南小北 <nanxiaobei@gmail.com>2018-09-02 14:59:24 +0800
committerGitHub <noreply@github.com>2018-09-02 14:59:24 +0800
commit1750b5b3549162ccf71389f20a7b0c631a3a7fba (patch)
treeb01c57dc7664df18da6c2566b0ac9f1733447b3b
parentc78342e7cc1876511b8ef2f9292b284edbdca03b (diff)
parent4976196c967a3155a761d3a7ca82d3f03e515958 (diff)
Merge pull request #9 from cemeng/master
:building_construction: Add Google analytics support
-rw-r--r--layouts/partials/header.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index a1a9774..1ab95d8 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -33,6 +33,9 @@
<meta name="generator" content="Hugo {{ .Hugo.Version }}">
<!-- RSS -->
<link rel="alternate" type="application/atom+xml" href="{{.Site.BaseURL}}index.xml" title="{{ .Site.Title }}">
+ {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+ {{ template "_internal/google_analytics_async.html" . }}
+ {{ end }}
</head>
<body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
<header class="header">