From feaf289d5bb1c9b7371f8e001a1e97b2dcb24c78 Mon Sep 17 00:00:00 2001 From: mpl Date: Mon, 18 Mar 2013 16:08:10 +0100 Subject: [PATCH] website: clean up PDoc hack Change-Id: Idf5ea94058d1da653442d435f8823f2f399f3f8e --- website/godoc.go | 8 +------- website/tmpl/package.html | 11 +---------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/website/godoc.go b/website/godoc.go index 089677aec..03fb31cae 100644 --- a/website/godoc.go +++ b/website/godoc.go @@ -58,7 +58,7 @@ type PageInfo struct { // package info FSet *token.FileSet // nil if no package documentation - PDoc *doc.Package // package documentation, but never nil anyway. + PDoc *doc.Package // nil if no package documentation Examples []*doc.Example // nil if no example code PAst *ast.File // nil if no AST with package exports IsPkg bool // true for pkg, false for cmd @@ -235,12 +235,6 @@ func getPageInfo(pkgName, diskPath string) (pi PageInfo, err error) { pkgName == pathpkg.Join(domainName, cmdPattern) { pi.Dirname = diskPath pi.populateDirs(diskPath, 2) - // TODO(mpl): trim down our now local package.html to avoid that, - // among other things. - // hack; setting PDoc so that we can keep using directly - // $GOROOT/lib/godoc/package.html, while avoiding the - // missing gopher png and the "ad" for the go dashboard. - pi.PDoc = &doc.Package{} return } bpkg, err := build.ImportDir(diskPath, 0) diff --git a/website/tmpl/package.html b/website/tmpl/package.html index ab9e521c3..349f7186b 100644 --- a/website/tmpl/package.html +++ b/website/tmpl/package.html @@ -179,13 +179,7 @@ {{with .Dirs}} {{/* DirList entries are numbers and strings - no need for FSet */}} - {{if $.PDoc}} -

Subdirectories

- {{else}} -
- -
- {{end}} +

Subdirectories

@@ -215,7 +209,4 @@ {{end}} {{end}}
Name
- {{if $.PDoc}}{{else}} -

Need more packages? Take a look at the Go Project Dashboard.

- {{end}} {{end}}