diff --git a/doc/root.html b/doc/root.html
index 635df1a0525..23a35eb8440 100644
--- a/doc/root.html
+++ b/doc/root.html
@@ -1,3 +1,7 @@
+
+
diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go
index 61a3142ff62..06da96b0fb6 100644
--- a/src/cmd/godoc/godoc.go
+++ b/src/cmd/godoc/godoc.go
@@ -74,12 +74,13 @@ var (
indexThrottle = flag.Float64("index_throttle", 0.75, "index throttle value; 0.0 = no time allocated, 1.0 = full throttle")
// file system mapping
- fs FileSystem // the underlying file system for godoc
- fsHttp http.FileSystem // the underlying file system for http
- fsMap Mapping // user-defined mapping
- fsTree RWValue // *Directory tree of packages, updated with each sync
- pathFilter RWValue // filter used when building fsMap directory trees
- fsModified RWValue // timestamp of last call to invalidateIndex
+ fs FileSystem // the underlying file system for godoc
+ fsHttp http.FileSystem // the underlying file system for http
+ fsMap Mapping // user-defined mapping
+ fsTree RWValue // *Directory tree of packages, updated with each sync
+ pathFilter RWValue // filter used when building fsMap directory trees
+ fsModified RWValue // timestamp of last call to invalidateIndex
+ docMetadata RWValue // mapping from paths to *Metadata
// http handlers
fileServer http.Handler // default file server
@@ -698,11 +699,6 @@ var (
jsonEnd = []byte("}-->")
)
-type Metadata struct {
- Title string
- Subtitle string
-}
-
func serveHTMLDoc(w http.ResponseWriter, r *http.Request, abspath, relpath string) {
// get HTML body contents
src, err := ReadFile(fs, abspath)
@@ -720,15 +716,9 @@ func serveHTMLDoc(w http.ResponseWriter, r *http.Request, abspath, relpath strin
}
// if it begins with a JSON blob, read in the metadata.
- var meta Metadata
- if bytes.HasPrefix(src, jsonStart) {
- if end := bytes.Index(src, jsonEnd); end > -1 {
- b := src[len(jsonStart)-1 : end+1] // drop leading