godoc: redirect bogus /doc/spec links to /ref/spec
It was not enough to make /ref/spec work (which it now does), because some of the docs on golang.org (in particular golang.org/doc) are pulled from tip, and tip links to /doc/spec now. Make those "too new" links work by redirecting /doc/spec back to /ref/spec for now. TBR=adg CC=golang-dev https://golang.org/cl/14348043
This commit is contained in:
parent
c11b695c55
commit
5785dc19d7
|
@ -90,12 +90,20 @@ var redirects = map[string]string{
|
|||
"/issue/new": "https://code.google.com/p/go/issues/entry",
|
||||
"/issues": "https://code.google.com/p/go/issues",
|
||||
"/play": "http://play.golang.org",
|
||||
|
||||
// THESE DO NOT WORK FOR GO 1.1 SITES SUCH AS golang.org.
|
||||
// DO NOT RE-ENABLE.
|
||||
// "/ref": "/doc/#references",
|
||||
// "/ref/": "/doc/#references",
|
||||
// "/ref/mem": "/doc/mem",
|
||||
// "/ref/spec": "/doc/spec",
|
||||
|
||||
// In fact, becuase golang.org pulls some pages from tip, there
|
||||
// are already links on the main golang.org page pointing at
|
||||
// the non-existent /doc/spec etc URLs. So redirect the other way.
|
||||
"/doc/mem": "/ref/mem",
|
||||
"/doc/spec": "/ref/spec",
|
||||
|
||||
"/talks": "http://talks.golang.org",
|
||||
"/tour": "http://tour.golang.org",
|
||||
"/wiki": "https://code.google.com/p/go-wiki/w/list",
|
||||
|
|
Loading…
Reference in New Issue