@@ -38,6 +38,7 @@ func PostsByTag(c *gin.Context) {
38
38
"title" : viper .GetString ("blog.title" ),
39
39
"description" : viper .GetString ("blog.description" ),
40
40
"extra" : template .HTML (fmt .Sprintf (`Posts tagged with <span class="home-sm-tag">%s</span>` , tag )),
41
+ "analytics" : gin.H {"tag" : viper .GetString ("analytics.tag" ), "enabled" : viper .GetBool ("analytics.enabled" )},
41
42
"author" : models .GetGlobalAuthor (),
42
43
}
43
44
c .HTML (http .StatusOK , "index.tmpl" , data )
@@ -53,6 +54,7 @@ func Post(c *gin.Context) {
53
54
"post" : page ,
54
55
"gitalk" : models .GetGitalk (),
55
56
"extra_style" : models .GlobCSS ,
57
+ "analytics" : gin.H {"tag" : viper .GetString ("analytics.tag" ), "enabled" : viper .GetBool ("analytics.enabled" )},
56
58
"share" : viper .GetBool ("blog.share" ),
57
59
"share_url" : page .GetShare (),
58
60
}
@@ -78,6 +80,7 @@ func Index(c *gin.Context) {
78
80
"posts" : models .SPages ,
79
81
"title" : viper .GetString ("blog.title" ),
80
82
"description" : viper .GetString ("blog.description" ),
83
+ "analytics" : gin.H {"tag" : viper .GetString ("analytics.tag" ), "enabled" : viper .GetBool ("analytics.enabled" )},
81
84
"author" : models .GetGlobalAuthor (),
82
85
}
83
86
c .HTML (http .StatusOK , "index.tmpl" , data )
0 commit comments