diff options
| author | 南小北 <nanxiaobei@gmail.com> | 2018-09-02 14:59:24 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-02 14:59:24 +0800 |
| commit | 1750b5b3549162ccf71389f20a7b0c631a3a7fba (patch) | |
| tree | b01c57dc7664df18da6c2566b0ac9f1733447b3b | |
| parent | c78342e7cc1876511b8ef2f9292b284edbdca03b (diff) | |
| parent | 4976196c967a3155a761d3a7ca82d3f03e515958 (diff) | |
Merge pull request #9 from cemeng/master
:building_construction: Add Google analytics support
| -rw-r--r-- | layouts/partials/header.html | 3 |
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"> |
