From b9b578154e7163b8802cf0b6e6ec755d83573a98 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 16 Sep 2013 15:46:38 +1000 Subject: [PATCH] go.tools/godoc: some content re-organization Remove References section heading. Add redirects from old paths to new content. Add a link to the SubRepositories wiki page from package list. Add styles for "pop-out" link. R=r CC=golang-dev https://golang.org/cl/13356047 --- cmd/godoc/handlers.go | 45 ++++++++++++++++++++++++++++----------- godoc/static/godoc.html | 1 - godoc/static/package.html | 2 +- godoc/static/static.go | 10 ++++++--- godoc/static/style.css | 7 +++++- 5 files changed, 46 insertions(+), 19 deletions(-) diff --git a/cmd/godoc/handlers.go b/cmd/godoc/handlers.go index 5d1ee6d8..3b43a78f 100644 --- a/cmd/godoc/handlers.go +++ b/cmd/godoc/handlers.go @@ -125,19 +125,38 @@ var cmdRedirects = map[string]string{ } var redirects = map[string]string{ - "/blog": "http://blog.golang.org", - "/build": "http://build.golang.org", - "/change": "https://code.google.com/p/go/source/list", - "/cl": "https://gocodereview.appspot.com/", - "/doc/go_for_cpp_programmers.html": "https://code.google.com/p/go-wiki/wiki/GoForCPPProgrammers", - "/doc/go_tutorial.html": "http://tour.golang.org/", - "/issue": "https://code.google.com/p/go/issues", - "/issue/new": "https://code.google.com/p/go/issues/entry", - "/issues": "https://code.google.com/p/go/issues", - "/play": "http://play.golang.org", - "/talks": "http://talks.golang.org", - "/tour": "http://tour.golang.org", - "/wiki": "https://code.google.com/p/go-wiki/w/list", + "/blog": "http://blog.golang.org", + "/build": "http://build.golang.org", + "/change": "https://code.google.com/p/go/source/list", + "/cl": "https://gocodereview.appspot.com/", + "/issue": "https://code.google.com/p/go/issues", + "/issue/new": "https://code.google.com/p/go/issues/entry", + "/issues": "https://code.google.com/p/go/issues", + "/play": "http://play.golang.org", + "/ref": "/doc/#references", + "/ref/": "/doc/#references", + "/ref/mem": "/doc/mem", + "/ref/spec": "/doc/spec", + "/talks": "http://talks.golang.org", + "/tour": "http://tour.golang.org", + "/wiki": "https://code.google.com/p/go-wiki/w/list", + + "/doc/articles/c_go_cgo.html": "/blog/c-go-cgo", + "/doc/articles/concurrency_patterns.html": "/blog/go-concurrency-patterns-timing-out-and", + "/doc/articles/defer_panic_recover.html": "/blog/defer-panic-and-recover", + "/doc/articles/error_handling.html": "/blog/error-handling-and-go", + "/doc/articles/gobs_of_data.html": "/blog/gobs-of-data", + "/doc/articles/godoc_documenting_go_code.html": "/blog/godoc-documenting-go-code", + "/doc/articles/gos_declaration_syntax.html": "/blog/gos-declaration-syntax", + "/doc/articles/image_draw.html": "/blog/go-imagedraw-package", + "/doc/articles/image_package.html": "/blog/go-image-package", + "/doc/articles/json_and_go.html": "/blog/json-and-go", + "/doc/articles/json_rpc_tale_of_interfaces.html": "/blog/json-rpc-tale-of-interfaces", + "/doc/articles/laws_of_reflection.html": "/blog/laws-of-reflection", + "/doc/articles/race_detector.html": "/blog/race-detector", + "/doc/articles/slices_usage_and_internals.html": "/blog/go-slices-usage-and-internals", + "/doc/go_for_cpp_programmers.html": "https://code.google.com/p/go-wiki/wiki/GoForCPPProgrammers", + "/doc/go_tutorial.html": "http://tour.golang.org/", } var prefixHelpers = map[string]string{ diff --git a/godoc/static/godoc.html b/godoc/static/godoc.html index 59a3a102..11766986 100644 --- a/godoc/static/godoc.html +++ b/godoc/static/godoc.html @@ -20,7 +20,6 @@