aboutsummaryrefslogtreecommitdiff
path: root/appengine.go
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2019-10-01 20:50:06 -0400
committerDmitri Shuralyov <dmitshur@golang.org>2019-10-02 16:48:51 +0000
commit72903b6eb1a41d70d77da59a70bf2b92b4a2d36a (patch)
tree6e9f3a5cfcaa40bb15b2146302eb2340a45c6610 /appengine.go
parente5b7b5cdcefd5131da2601628a773471c577a773 (diff)
blog: add analytics HTML and deploy instructions
When deployed with App Engine on blog.golang.org, insert analytics HTML at the beginning of <head>. Add deploy instructions to the README. Also update to the App Engine Go 1.12 runtime. Change-Id: Icf0919fd22d80cb8cb765845acd1d72f85f11fa1 Reviewed-on: https://go-review.googlesource.com/c/blog/+/198337 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'appengine.go')
-rw-r--r--appengine.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/appengine.go b/appengine.go
index 3b65bc7..dcf19a6 100644
--- a/appengine.go
+++ b/appengine.go
@@ -7,6 +7,7 @@
package main
import (
+ "html/template"
"log"
"net/http"
"os"
@@ -17,6 +18,7 @@ import (
func gaeMain() {
config.ContentPath = "content/"
config.TemplatePath = "template/"
+ config.AnalyticsHTML = template.HTML(os.Getenv("BLOG_ANALYTICS"))
s, err := blog.NewServer(config)
if err != nil {
log.Fatalln(err)