Also clean up hostEnforcerHandler doc comment while we are here.
Change-Id: I2db17d8146eaba95c887e1439320e30e9c8fc769
Reviewed-on: https://go-review.googlesource.com/c/website/+/328009
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The version cleaner deleted the very old version of golang.org
named "google", as it was designed to do. Make google.golang.org
its own service instead of a precarious version.
Already deployed, to bring back google.golang.org.
Change-Id: Ia3e63a93d8b613e9cc7f7d241d9187d9422cf6ba
Reviewed-on: https://go-review.googlesource.com/c/website/+/328689
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This app has been through a lot of evolution and has accumulated
a lot of cruft in the way it is deployed. We can simplify deployment
down to a short Cloud Build script and go back to regular App Engine
for execution.
Also remove the prod-vs-local distinction and the build tag complexity.
App Engine Flex doesn't let us have extant versions without at least
a couple dedicated VMs, and then it also imposes a limit of 20 VMs,
which makes it unsuitable for continuous deployment, where we can
rack up many versions in a short amount of time. Going back to
App Engine Standard is a better fit, since versions that aren't getting
traffic scale down to zero.
Using App Engine Standard also matches blog and go.dev,
which will help with the eventual merging of all these servers.
Change-Id: I35167b569327ad253b9d367d747072a269205b20
Reviewed-on: https://go-review.googlesource.com/c/website/+/323892
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
With the help of the backported libraries introduced in the previous CL,
we can make the whole cmd/golangorg site run on Go 1.15 again.
This will let us use App Engine standard in advance of the release
of Go 1.16 on App Engine.
Change-Id: I9d1612de6f366e0774919aa6a94af14aafb248f5
Reviewed-on: https://go-review.googlesource.com/c/website/+/323891
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Much shorter and clearer.
This also opens up the possibility of sharing
some tests between TestWeb and TestLiveServer.
Change-Id: Iaca004c88581b0e0d8c858333806f755cc140255
Reviewed-on: https://go-review.googlesource.com/c/website/+/321075
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Preparation for moving to a new package.
Change-Id: Ib246f694f950eadcb9afa78e6551c8fb22e109a8
Reviewed-on: https://go-review.googlesource.com/c/website/+/317660
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The toFS calls were a stop-gap to convert from old code that wasn't
strict about path forms to the io/fs routines that are more strict.
Arrange to pass io/fs-compatible paths everywhere and remove toFS.
Change-Id: Id69c0f23074ebd3a6dfef2255b2f8185ad1d1249
Reviewed-on: https://go-review.googlesource.com/c/website/+/317659
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This completes an old TODO and uses the standard site frame
for the download page instead of having a separate copy.
Change-Id: Id647a6bb03d563b007b16cab51f40083d071c944
Reviewed-on: https://go-review.googlesource.com/c/website/+/317658
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
prod.go is build-tagged away and not updated by rf.
Change-Id: I40a655586ff9e019cccdf82ca96b25c6b80e383d
Reviewed-on: https://go-review.googlesource.com/c/website/+/317657
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
- convert from text/template to html/template
- use proper template set
- always pass *godoc.Page to templates, with custom value in .Data
- move stateful site template functions to methods on *godoc.Page
- unexport Presentation.ServeFile: ServeHTTP is good enough
- reorder api.DB.Func args to match source order (pkg first)
- rename lib/godoc/godoc.html to lib/godoc/site.html
(lib/godoc itself must stay lib/godoc because of links to other content it holds).
Change-Id: I873f17db20107fdab11d276932e6d847a6081015
Reviewed-on: https://go-review.googlesource.com/c/website/+/317655
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Redirects can be handled by internal/redirect.
Raw-text serving is already handled in internal/godoc.
It can handle robots.txt and /doc/play/ too and avoid
exposing the underlying FileServer.
Change-Id: I11dda651128815b17cbd3a5db6572f21067529a7
Reviewed-on: https://go-review.googlesource.com/c/website/+/317653
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
CL 296383 removed a trailing slash and .html suffix from some URLs.
CL 296429 changed the date format from yyyy/mm/dd to yyyy-mm-dd.
Update TestLiveServer accordingly so it passes on an instance that
would be deployed.
Change-Id: I6a632c8db1a6bc335946a7f6b131c6af60021b94
Reviewed-on: https://go-review.googlesource.com/c/website/+/322971
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
There's nothing left in Corpus but the file system and the API database.
Hoist them into Presentation and delete the Corpus itself.
Change-Id: I2cb61b77122b2f7216b0b2a96fd6b48e29eae189
Reviewed-on: https://go-review.googlesource.com/c/website/+/317651
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Back when the entire site had to live in $GOROOT/doc, we needed
some way to specify content that was served from URLs outside of golang.org/doc,
so we added the ability for a doc to declare its own URL (the Path metadata).
That meant the file system layout did not match the URL layout.
That meant the content for any particular URL could be anywhere in the file system.
That meant the entire file system had to be scanned to serve a URL.
That meant an index of the file system had to be built and updated.
Now that we have a file tree (_content) for the whole of golang.org,
we can move files to make the file system layout match the URL space.
Then each URL can be served by just reading the right file.
Then the index and its updater can be deleted.
And now if you want to edit /doc/gdb it's obvious which file to open.
Change-Id: I3357f275e61a31c8de3091af580cac80753e71a4
Reviewed-on: https://go-review.googlesource.com/c/website/+/296383
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The special cases were simulating the normal template execution
and passing extra data (the release history).
We have a standard way to pass extra data (template functions),
so use one and delete the special case code.
Also change date format to standard yyyy-mm-dd.
The yyyy/mm/dd we have been using is kind of made up
and certainly unusual (see https://xkcd.com/1179/).
Change-Id: I59f4f67259381dd43cd53c0f6120f87d8f8c77d9
Reviewed-on: https://go-review.googlesource.com/c/website/+/296429
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
There is lots of dead flexibility in this code.
Remove it, to make the control flow and data dependencies
easier to understand.
Change-Id: Ie9aa7bc96afc64d2a07677a73f8fb311808ef307
Reviewed-on: https://go-review.googlesource.com/c/website/+/296377
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The /search endpoint was removed in CL 293412 and CL 293427.
Change-Id: I0f11a27bad63f68f211b12dcb77e8ace0daadfdc
Reviewed-on: https://go-review.googlesource.com/c/website/+/299369
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
We no longer serve search from the golang.org site.
Change-Id: I8b855cf664f175c0dc46a91e3017df1bebb28281
Reviewed-on: https://go-review.googlesource.com/c/website/+/293427
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
All handlers (except the App Engine production ones) should
be registered on the mux protected by hostEnforcerHandler.
Do that, and sort the registrations for easy scanning (by people).
Change-Id: I96813eb105f63bf37abed4898ccf23d1f16cc8d4
Reviewed-on: https://go-review.googlesource.com/c/website/+/293416
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
"Nothing to see here; move along" was a funny throwaway line years ago.
It's a bit confusing now when it appears for a brief moment during
the redirect, especially for people not familiar with the idiom.
Show clearer text.
Change-Id: Ia2e8314e1a9f93e9148fb96aec0278f5815ae230
Reviewed-on: https://go-review.googlesource.com/c/website/+/293415
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
For historical reasons, files in _content/, like _content/play.js,
were served as https://golang.org/lib/godoc/play.js.
Remove some complex setup by moving them to names that
match the actual serving location, such as _content/lib/godoc/play.js.
Change-Id: Ib92c3db7566b24da40e803781aca590f6bc22c8b
Reviewed-on: https://go-review.googlesource.com/c/website/+/293414
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
There was too much duplicated code between main.go
and appinit.go and too many build-tagged-out files.
Make main.go the func main for both prod and local.
Introduce local.go, merging dl.go and play.go.
Introduce prod.go, holding the prod-specific bits of appinit.go
(the rest are in main.go).
Rename the build tag to prod instead of golangorg
(the whole program is golangorg; it's very confusing).
Fixesgolang/go#41102.
Change-Id: I261ce8e9171110f01798025f8218ce9f8253af81
Reviewed-on: https://go-review.googlesource.com/c/website/+/293413
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Now that search is turned off, all the index code can be deleted.
For golang/go#41102.
Change-Id: Idb82f2b80cadb5a2d209b5e5995d38c35ffaf8db
Reviewed-on: https://go-review.googlesource.com/c/website/+/293412
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The extra level of hierarchy here is unnecessary and confusing.
The directory is now _content so that any Go source files in our
docs are not considered by commands like "go mod tidy" and
"go test all".
Change-Id: Ib6d7cb12920193798ee825155a8f8b33f16e60d8
Reviewed-on: https://go-review.googlesource.com/c/website/+/291691
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This lets us delete the generated static.go.
For golang/go#41102
Change-Id: Ie09f34a83f114592eec4ba2dd9263285169374ae
Reviewed-on: https://go-review.googlesource.com/c/website/+/291690
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
We'd like to make it possible for people to run the web site with
go run ./cmd/golangorg -a
without having to worry about go generate or figuring out the -templates flag.
This is a step in that direction: it sets -templates correctly.
Even so, -templates is still incompatible with Markdown files.
Change-Id: I97afaafdbc66500c674c959383334bf2e5185316
Reviewed-on: https://go-review.googlesource.com/c/website/+/251377
Trust: Russ Cox <rsc@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Change the redirects to pkg.go.dev from godoc.org
Change-Id: Iecb1f6b16881bedaa47d65427b75b90baa2ae02a
Reviewed-on: https://go-review.googlesource.com/c/website/+/282292
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
This makes it clear that the program isn't still building or hung,
and it also reminds users what port is being used.
Change-Id: I63b27cc34e1ada407c75022f53aa64d7e21647da
Reviewed-on: https://go-review.googlesource.com/c/website/+/251117
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
They have been pre-announced¹.
Also update the release summary template to not point to the issue
tracker for future releases. The issue tracker is representative of
the final release content only for releases that have been completed.
¹ https://groups.google.com/d/msg/golang-announce/f2c5bqrGH_g/GnH6k56AAAAJ
Change-Id: I1b05a0d6ce3f3f05a441979f529d449a2f49465e
Reviewed-on: https://go-review.googlesource.com/c/website/+/242317
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
The /dl/{file} URLs have been supported for many years but not well
documented. Start using them on the /dl/ HTML page and document them,
so that it is clear that they can be reliably used in scripts or so.
This causes clients to have to make an extra HTTP request (which gets
redirected to the target location serving the file bytes), but compared
to the total work to download a Go file, this is negligible. Clients
that really want to skip the redirect can do so, but the trade-off is
that they need to update the URL if the CDN used for Go file downloads
happens to change. The /dl/{file} links are not expected to change for
Go 1.
Fixesgolang/go#38713.
Change-Id: I9df7d5b761baa6fa657c5dd2063c97b9b457367c
Reviewed-on: https://go-review.googlesource.com/c/website/+/238517
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
This change re-enables the /s/ link shortener admin interface,
running as its own App Engine service on the go111 runtime,
which still supports the “login: admin” option in app.yaml.
+ The golangorg build constraint on the internal/memcache and
internal/short packages is removed to allow easy import
+ A new function, AdminHandler is introduced in the short package
to allow for registering the handler outside of it
+ Some page cleanup to leverage modern HTML and JS capabilities,
obviating the need for jQuery, which has been removed
+ Clients for Redis and Cloud Datastore have been updated to
the latest versions
Fixesgolang/go#29988
Change-Id: If6ca75e85e16a7d86bb5dafcf08b27d2dc36f530
Reviewed-on: https://go-review.googlesource.com/c/website/+/238545
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The URL format has changed slightly, update it so that the Flexible
environment filter continues to be active.
Also, avoid printing directions at the end of the publish step in the
Makefile. Doing so creates overlap with the steps already listed in
the README and can be confusing. Instead, point back to the README.
Change-Id: If1d06735dff5744b81ad127e8621a35fa5bf167b
Reviewed-on: https://go-review.googlesource.com/c/website/+/234679
Reviewed-by: Chris Broadfoot <cbro@golang.org>
We are moving google-api-go-client to GitHub.
Change-Id: I1f231032f6881f0167dd742a0e46f725326ffca8
Reviewed-on: https://go-review.googlesource.com/c/website/+/234532
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Allow golang.org/x repos to opt-in to use pkg.go.dev for documentation.
The golang.org/x/pkgsite repository is the first one to use it.
Update to current golang.org/x/build version and regenerate:
go get golang.org/x/build/repos@92427f67eca1ac8f769c740f272196f368082630
go mod tidy
go generate ./...
Fixesgolang/go#39150.
For golang/go#36747.
For golang/go#36106.
Change-Id: Ia91725c12546c4e7467601d951144af3cb1e6863
Reviewed-on: https://go-review.googlesource.com/c/website/+/234678
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
There were a few files with different wording in the license header
than is present in the rest of the repository. Update these to say
“BSD-style” instead of “Apache 2.0”.
Change-Id: I24df0e69fbd18728dcf1aec8166c5a52407930f6
Reviewed-on: https://go-review.googlesource.com/c/website/+/231159
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This change builds on what was done in CL 229081, and uses the Go
release history data from internal/history package to generate the
list of major Go versions on the Go project page.
This way, this page doesn't need to be manually edited when major
Go releases are made.
For golang/go#38488.
For golang/go#29205.
For golang/go#29206.
Change-Id: Ie0b12707d828207173a54f0a1bc6a4ef69dcedef
Reviewed-on: https://go-review.googlesource.com/c/website/+/229483
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Make it more clear that this type represents a Go-specific version,
rather than a version that follows the Semantic Versioning 2.0.0
specification. The type already has Go-specific methods, for example
IsMajor reports true for "1.14" and IsMinor reports true for "1.14.1".
This is consistent with the terminology used by Go releases, but
very surprising if considered from the perspective of semver.
Document some differences of the Go-specific version convention
compared to semver, and describe the X, Y, Z fields in more detail.
This change makes it viable to add a String method to GoVer type
documented to print a Go-specific version string, which will be
useful in more places in CL 229483.
For golang/go#32450.
Change-Id: If7482fdb4a739ff5b89b7133402d94412057f590
Reviewed-on: https://go-review.googlesource.com/c/website/+/229481
Reviewed-by: Carlos Amedee <carlos@golang.org>
Previously, the release history page was a raw HTML file that was
manually edited whenever new Go releases were made. This change
converts release history entries into a structured format in the
new internal/history package, and generates release history entries
from that format.
For now, only Go 1.9 and newer releases are converted, but the
structured format is flexible enough to represent all releases
going back to the original Go 1 release.
Various English grammar rules and special cases are preserved,
so that the release history entries appear in a consistent way.
New release history entries need only to be added to the internal/
history package, making it so that English grammar rules and HTML
tags don't need to go through human code review for each release.
Future work may involve constructing that list from data already
available in the Go issue tracker.
This change makes minimal contributions to reducing the dependence
of x/website on the x/tools/godoc rendering engine for displaying
pages other than Go package documentation. The x/tools/godoc code
is in another module and does not provide flexibility desired for
the general purpose website needs of x/website.
Fixesgolang/go#38488.
For golang/go#37090.
For golang/go#29206.
Change-Id: I80864e4f218782e6e3b5fcd5a1d63f3699314c81
Reviewed-on: https://go-review.googlesource.com/c/website/+/229081
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
When generating an index, point the GOPATH environment variable to
an empty directory. Setting it to the empty string doesn't work as
of Go 1.8, where a default GOPATH value was added¹.
¹ https://golang.org/doc/go1.8#gopath
Change-Id: I9adfa60e8aa9c6931e3752b24720ec6e77932c9a
Reviewed-on: https://go-review.googlesource.com/c/website/+/221105
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
The default suffix length is 2 letters, which can cause split files to
have suffixes such as .cc, .go, and so on. Files with those suffixes
are misinterpreted to be source code files, and prevent the golangorg
command from building successfully.
Avoid this problem by using a suffix of length 8.
Use a single space to separate flags and values, for consistency.
Change-Id: I5120286a6f56091db8e46e6a74ca2eb98994de60
Reviewed-on: https://go-review.googlesource.com/c/website/+/220997
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Added the Go 1.14 entry in the releases page.
Updated the GO_REF value in the deployment Makefile to
use the release-branch.go1.14 branch.
Change-Id: Ic66da008fa262ba642a2dbff775bee0ee70c1bf7
Reviewed-on: https://go-review.googlesource.com/c/website/+/220899
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Increase the separation between each step by giving them explicit
numbers. Expand on some of the deploy steps with more detail.
Update the default value of GO_REF to the current Go release branch
version. This way, it doesn't need to be overridden for each deploy.
Update references to the README.md file (it was recently renamed from
README.golangorg-app in CL 207438).
Change-Id: Ie34fed44a990a5c7ffe2acad68fd5c0f094f9143
Reviewed-on: https://go-review.googlesource.com/c/website/+/212239
Reviewed-by: Carlos Amedee <carlos@golang.org>
Also, add tests.
This also removes the golang.org/x/codereview redirect because
code.google.com and our Mercurial repository are long dead.
Updates golang/go#36047
Change-Id: I0aacbe5a963b0edeea2dd2f1b2e2ad6a2f1f7319
Reviewed-on: https://go-review.googlesource.com/c/website/+/210744
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Make the README cover local non-production mode too,
update file name to match, and convert to markdown.
Change-Id: I7e3c86bf4ae2a3aeaed2dd2e3134747a275a006b
Reviewed-on: https://go-review.googlesource.com/c/website/+/207438
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The Code of Conduct is copied from Go master as of Nov 15 2019 (9b68ef81e606)
with a change to update the Project Stewards (now Carmen Andoh and Van Riper),
and no other changes.
This CL also updates static/gen.go to include this file
and regenerated static/static.go.
Change-Id: Ic639b821031f2ad41727728b3dc3b5b69e6d5265
Reviewed-on: https://go-review.googlesource.com/c/website/+/207437
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
For now, continue to use the existing /_ah/health HTTP endpoint
for both the liveness and readiness checks. This is simple and
close to the previous legacy health check behavior. In the future,
we can consider making the readiness check more sophisticated.
This change should make golangorg deployable again after the
deprecation of legacy health checks.¹
¹ https://cloud.google.com/appengine/docs/flexible/go/migrating-to-split-health-checks
Change-Id: Ia68d3b260dd3a5b66f969318a04b8f97639701d6
Reviewed-on: https://go-review.googlesource.com/c/website/+/201743
Reviewed-by: Katie Hockman <katie@golang.org>
In the "/doc" directory, files are now served from the
content/static/doc, then from GOROOT/doc (where GOROOT is either a zip
file or the GOROOT directory).
This allows documentation to be moved to golang.org outside of the
normal Go release cycle. For example, this CL moves (but does not
modify) doc/docs.html here. Documentation that is tied to the Go
release cycle (for example, doc/spec.html) will not be moved.
Updates golang/go#33637
Updates golang/go#29206
Change-Id: I5f1c577e0ffddc3418653bdd9b0cc36cf79e3fe1
Reviewed-on: https://go-review.googlesource.com/c/website/+/197638
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The -url flag is unused. It had relatively niche
use-cases and was mostly a relic from cmd/godoc.
It's also completely non-functional due to a few bugs and
the fact CL 162907 hasn't been backported to x/website.
Instead of fixing it and adding tests, remove it.
If it becomes needed in the future, it can be re-added.
Update golang/go#29206
Change-Id: I4a460f460a757c78c3e26d7c97556c623c8dbed4
Reviewed-on: https://go-review.googlesource.com/c/website/+/197722
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
The documentation of the "flat" presentation mode was removed
inadvertently as part of post-CLI-removal documentation cleanup
in CL 143077. The FlatDir flag still exists and is supported.
This change re-adds it to cmd/golangorg documentation.
Also fix a typo in the "src" presentation mode description.
(This is a re-apply of CL 162984 into x/website.)
Updates golang/go#25443
Updates golang/go#29206
Change-Id: I84145bf38f008678a8d8f3d3346f646aa7811886
Reviewed-on: https://go-review.googlesource.com/c/website/+/197721
Reviewed-by: Andrew Bonventre <andybons@golang.org>
It was unused and incomplete.
It was potentially needed a while ago, back when the golang.org
website was running on a different Google Cloud Platform service.
It's not needed now, and can be re-added in the future
if it becomes needed again.
Change-Id: Id52945adf18b1e34f411f9a2eef6bd21889c6c1a
Reviewed-on: https://go-review.googlesource.com/c/website/+/197957
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Remove the override, use the default godoc.Presentation value of 4.
This increases consistency across various Go websites, and reduces
the amount of blank horizontal space use.
Fixesgolang/go#34448
Change-Id: Ie3e40f13e6275e74e79c46bbc242d4e5ad95ffda
Reviewed-on: https://go-review.googlesource.com/c/website/+/196937
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
This code was originally in Google's internal repo, but there's
no good reason for it to stay there.
Change-Id: Id2cd2b2bb3691a14182a02e01c40005652106402
Reviewed-on: https://go-review.googlesource.com/c/website/+/191160
Reviewed-by: Katie Hockman <katie@golang.org>
It wasn't being used in golangorg. So we remove it and just let it
be in godoc.
Fixesgolang/go#33270
Change-Id: I5c2b4afcb216f1e661011e8d8a5ffe928be9bea8
Reviewed-on: https://go-review.googlesource.com/c/website/+/187537
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
flag.Parse during init is always incorrect (other packages may
want to register flags).
Updates golang/go#31859
Change-Id: Id65bfaab52075220897aacb78c4a7bb6dba16c58
Reviewed-on: https://go-review.googlesource.com/c/website/+/187738
Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com>
This also adds a new page, copyright.html, with the longer copyright
text currently in the footer.
Some minor changes were made to godocs.js to ensure that a UI
element used by the analysis features is hidden properly. Otherwise
a black line shows up at the bottom of the page.
Updates golang/go#9936
Change-Id: Ie92b3b5a97d4969b7499f9e1ef9f8fad337b3aa0
Reviewed-on: https://go-review.googlesource.com/c/website/+/183038
Reviewed-by: Katie Hockman <katie@golang.org>
This change alters the behavior to use a local copy of root.html
to render the homepage of golang.org. It is copied directly from
revision b7422f2128 of doc/root.html
in the main go repository.
This will enable changes to be made to the homepage without having
to cherry pick them to a release branch.
Updates golang/go#9936
Updates golang/go#29206
Change-Id: I68a6ef017b969f8838f466721bce51c1b8a358d8
Reviewed-on: https://go-review.googlesource.com/c/website/+/180959
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
This change de-duplicates the same configuration used between
the previous x/tools/godoc/env package and x/website's own
internal/env package. It does so by using the new golangorgenv
package.
This makes it possible to remove the old GODOC_PROD and
GODOC_ENFORCE_HOSTS env vars from app.prod.yaml.
The IsProd configuration value was very generic and yet being
used only in one place. Replace it with a more targeted one.
The new name does a better job of communicating what the
implications of setting or not setting it are.
Apply the same change to logic of googleCN as in CL 165459.
Update the required version of the x/tools module to a newer version
that includes CL 160837, which is required for this change.
Starting with this change, we're changing the x/website policy in that
it's now allowed to start using newer versions of subrepos from the
master branch, rather than only using the release-branches of subrepos.
This is in line with the goal of making x/website more self-contained
and less constrained by the Go release schedule.
Updates golang/go#29206
Change-Id: If8847e9276fb18e3ded56fabbf915cdd19176699
Reviewed-on: https://go-review.googlesource.com/c/website/+/165837
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
While x/website relies on environment variables with the GOLANGORG_
prefix (as defined in app.prod.yaml), the required version of the
x/tools/godoc package relies on environment variables with the
GODOC_ prefix. So when it doesn't find them, it defaults to
GODOC_PROD and GODOC_ENFORCE_HOSTS being false. This causes the
website's share settings to not be set properly.
To resolve this issue we are adding GODOC_PROD and
GODOC_ENFORCE_HOSTS variables to x/website's app.prod.yaml
explicitly with the intention of deleting them in the future when
it is safe to do so.
Updates golang/go#29206
Change-Id: I5db74d680241b532f51bcc73eb51151e9f60483f
Reviewed-on: https://go-review.googlesource.com/c/164818
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Update the GCP console link to have an Environment=Flexible filter,
so the list of old website versions doesn't include extraneous entries.
The versionsquery query parameter is not easily readable, but it's what
GCP uses. It encodes the following information:
[{"k":"env","t":10,"v":"\"FLEXIBLE\"","s":true}]
Remove the versionssize=50 query parameter, since it's not critical,
to make the URL shorter and easier to copy.
Change-Id: I09e7c25191668af10aef0783b2760af3b7873654
Reviewed-on: https://go-review.googlesource.com/c/163177
Reviewed-by: Channing Kimble-Brown <channing@golang.org>
This CL changes the deployment scripts so that they deploy x/website to
golang.org (GCP service name: default). x/website is now the canonical
source of golang.org.
Updates golang/go#29206
Change-Id: If29be6b191b84ac8856e4c0aa6239f96da41629b
Reviewed-on: https://go-review.googlesource.com/c/162157
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This change is part of an effort to deploy x/website to its own
subdomain on GCP. Everything needs to be working properly on the
subdomain before x/website can become the canonical website
(golang.org). There is currently a functional deployment of
x/website to the 'new-website' service under golang-org on GCP.
With these specific changes, x/website gets deployed to the
service 'new-website'. By changing both the service field in
app.prod.yaml and the GCP_SERVICE variable in Makefile to
'default', these files could be used to deploy x/website to
the 'default' service as well.
Updates golang/go#29206
Change-Id: I47340333b9e09672e8588c330d629857d1d0bf0d
Reviewed-on: https://go-review.googlesource.com/c/161198
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This is the first step towards deduplicating the doc folder so
that any changes in go/doc don't have to be backported to
the x/website repo. In the long term, the doc folder will
ultimately live in x/website, but that will be prioritized later
once x/tools has had website related code properly moved to
x/website.
Updates golang/go#29206
Change-Id: I1c5d200e9e72d3e24bc87f79e1d34faa8c9af36b
Reviewed-on: https://go-review.googlesource.com/c/160237
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Backporting the change from CL 159739 since updates to
x/tools/cmd/godoc are not automatically mirrored to cmd/golangorg
Updates golang/go#29206
Change-Id: Ic377255b321ab73cfb04513aa00a510e407a2bdf
Reviewed-on: https://go-review.googlesource.com/c/160137
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Now that the internal directory contains copies of the packages
from x/tools/godoc the import paths and dependencies can refer
to accessible files. The build now works for both the app engine
and non app engine configurations.
Updates golang/go#29206
Change-Id: I3ac8070b8a3c01d0ca40e3f5586d05fc9b5bb8ff
Reviewed-on: https://go-review.googlesource.com/c/159918
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Now the website is using modules, specifically using x/tools version
v0.0.0-20190124215303-cc6a436ffe6b to ensure that the website will
continue to work.
Also minor change to rename README.golangorgserver-app as README.golangorg-app
to reflect the current name of the website binary.
Updates golang/go#29206
Change-Id: I284de2152093ac0a6fcdecbfa185d091435c5691
Reviewed-on: https://go-review.googlesource.com/c/159897
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The godoc package and the packages inside (an exact copy of
x/tools/godoc) are being removed from x/website/cmd/golangorg
because the package should not be in the folder used to build
the binary when it's being used as a library. Also, all the work
to turn documentation-rendering into a library separate from
x/website and the godoc binary will be done in x/tools/godoc.
Over time files and packages that are solely used by the website
will be moved back into this repo. All corresponding path name
changes were made to all files importing the godoc/... packages.
Updates golang/go#29206
Change-Id: I13740b66b967fc413eed7e90bff54f859cf36150
Reviewed-on: https://go-review.googlesource.com/c/159737
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
All of the code and static assets that the website uses to run have been
copied to this repo. There was also a few lines of code added telling
the website where the doc directory, favicon.ico and robots.txt are.
go repo change-id: Ife6443c32673b38000b90dd2efb2985db37ab773
x/tools repo change-id: Ia979a8b06d1b4db47d25ffdfdf925ba8a0ac67de
Real new code additions:
- main.go
* lines 89-95 added getFullPath method
* lines 217-222 mapped paths to doc/, favicon.ico, robots.txt in vfs
- appinit.go
* lines 147-153 added getFullPath method
* lines 80-84 mapped paths to doc/, favicon.ico in vfs
Several files were copied from x/tools and go so paths (and corresponding
import paths) were changed as follows:
"x/tools/cmd/godoc/" --> "x/website/cmd/golangorg/"
"x/tools/godoc/static/" --> "x/website/content/static/"
"x/tools/godoc/" (without godoc/static/) --> "x/website/cmd/golangorg/godoc/"
"x/tools/internal/memcache" --> "x/website/internal/memcache"
"go/doc/" --> "x/website/content/doc/"
"go/favicon.ico" --> "x/website/favicon.ico"
"go/robots.txt" --> "x/website/robots.txt"
Updates golang/go#29206
Change-Id: I53985fc027f73e60c6946038f85133acf1ecb08c
Reviewed-on: https://go-review.googlesource.com/c/156321
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>