godoc: add links to docs in text and dir pages
Fixes golang/go#17125
Change-Id: I22dd0561cd1c8eb30524797b6c0488d08a65285b
Reviewed-on: https://go-review.googlesource.com/29279
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/godoc/server.go b/godoc/server.go
index ffe5997..c9b4056 100644
--- a/godoc/server.go
+++ b/godoc/server.go
@@ -579,7 +579,8 @@
fmt.Fprintf(&buf, `<p><a href="/%s?m=text">View as plain text</a></p>`, htmlpkg.EscapeString(relpath))
p.ServePage(w, Page{
- Title: title + " " + relpath,
+ Title: title,
+ SrcPath: relpath,
Tabtitle: relpath,
Body: buf.Bytes(),
Share: allowShare(r),
@@ -649,7 +650,8 @@
}
p.ServePage(w, Page{
- Title: "Directory " + relpath,
+ Title: "Directory",
+ SrcPath: relpath,
Tabtitle: relpath,
Body: applyTemplate(p.DirlistHTML, "dirlistHTML", list),
Share: allowShare(r),