Add internal Google Analytics template

This commits also adds the GoogleAnalytics
variable to insert the tracking code.

Fixes #1424.
This commit is contained in:
digitalcraftsman
2015-10-19 13:31:03 +02:00
committed by spf13
parent ca55ea505a
commit 9dbb6dc50d
4 changed files with 16 additions and 1 deletions

View File

@@ -127,6 +127,7 @@ Hugo boasts the following features:
### Additional Features
* Integrated [Disqus](https://disqus.com/) comment support
* Integrated [Google Analytics](https://google-analytics.com/) support
* Automatic [RSS](/layout/rss/) creation
* Support for [Go](http://golang.org/pkg/html/template/), [Amber](https://github.com/eknkc/amber) and [Ace](http://ace.yoss.si/) HTML templates
* Syntax [highlighting](/extras/highlighting/) powered by [Pygments](http://pygments.org/)
@@ -183,4 +184,3 @@ as I have writing it.
* [Join the Mailing List](/community/mailing-list/)
* [Star us on GitHub](https://github.com/spf13/hugo)
* [Discussion Forum](http://discuss.gohugo.io/)

View File

@@ -127,6 +127,7 @@ Also available is `.Site` which has the following:
**.Site.Author** A map of the authors as defined in the site configuration.<br>
**.Site.LanguageCode** A string representing the language as defined in the site configuration.<br>
**.Site.DisqusShortname** A string representing the shortname of the Disqus shortcode as defined in the site configuration.<br>
**.Site.GoogleAnalytics** A string representing your tracking code for Google Analytics as defined in the site configuration.<br>
**.Site.Copyright** A string representing the copyright of your web site as defined in the site configuration.<br>
**.Site.LastChange** A string representing the date/time of the most recent change to your site, based on the [`date` variable]({{< ref "content/front-matter.md#required-variables" >}}) in the front matter of your content pages.<br>
**.Site.Permalinks** A string to override the default permalink format. Defined in the site configuration.<br>