diff --git a/README.md b/README.md index 2314361f..82274ee9 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ [![Go Reference](https://pkg.go.dev/badge/golang.org/x/website.svg)](https://pkg.go.dev/golang.org/x/website) -This repo holds content and serving programs for the golang.org and go.dev web sites. +This repo holds content and serving programs for the go.dev and golang.org web sites. -Content is in _content/ (go.dev) and tour/ (tour.golang.org). +Content is in _content/ (go.dev) and tour/ (go.dev/tour). Server code is in cmd/ and internal/. -To run the combined golang.org+go.dev server to preview local content changes, use: +To run the combined go.dev+golang.org server to preview local content changes, use: go run ./cmd/golangorg @@ -23,7 +23,7 @@ This repository uses [prettier](https://prettier.io/) to format JS and CSS files See also: -- [CSS](https://golang.org/wiki/CSSStyleGuide) +- [CSS](https://go.dev/wiki/CSSStyleGuide) - [JavaScript](https://google.github.io/styleguide/jsguide.html) The version of `prettier` used is 1.18.2. @@ -33,22 +33,14 @@ a change. However, it is not a strict requirement enforced by CI. ## Deploying -Each time a CL is reviewed and submitted, the blog is automatically deployed to App Engine. -If the CL is submitted with a Website-Publish +1 vote, -the new deployment automatically becomes https://go.dev/. -Otherwise, the new deployment can be found in the -[App Engine versions list](https://console.cloud.google.com/appengine/versions?project=golang-org&serviceId=default) and verified and manually promoted. - -If the automatic deployment is not working, or to check on the status of a pending deployment, -see the “website-redeploy-go-dev” trigger in the -[Cloud Build console](https://console.cloud.google.com/cloud-build/builds?project=golang-org). +Each time a CL is reviewed and submitted, the code is deployed to App Engine. +See [cmd/golangorg/README.md](cmd/golangorg/README.md#deploying-to-go_dev-and-golang_org) for details. ## Report Issues / Send Patches This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. +this repository, see https://go.dev/doc/contribute. The main issue tracker for the website repository is located at https://github.com/golang/go/issues. Prefix your issue with "x/website:" in the subject line, so it is easy to find. - diff --git a/cmd/golangorg/README.md b/cmd/golangorg/README.md index 96d81430..9672017a 100644 --- a/cmd/golangorg/README.md +++ b/cmd/golangorg/README.md @@ -8,14 +8,30 @@ http://localhost:6060/go.dev/blog. go run . -## Deploying to golang.org +## Testing + +The go.dev and golang.org web sites have a suite of regression tests that can be run with: + + go test golang.org/x/website/... + +Test cases that check for expected URLs, content, response codes and so on are +encoded in \*.txt files in the `testdata` directory. If there is a problem that +no existing test caught, it can be a good idea to add a new test case to avoid +repeat regressions. + +These tests can be run locally, via TryBots, and they are also run when +new versions are being deployed. The `testdata/live.txt` file is special +and used only when testing a live server, because its test cases depend +on production resources. + +## Deploying to go.dev and golang.org Each time a CL is reviewed and submitted, the site is automatically deployed to App Engine. If the CL is submitted with a Website-Publish +1 vote, -the new deployment automatically becomes https://golang.org/. +the new deployment automatically becomes https://go.dev/. Otherwise, the new deployment can be found in the [App Engine versions list](https://console.cloud.google.com/appengine/versions?project=golang-org&serviceId=default) and verified and manually promoted. If the automatic deployment is not working, or to check on the status of a pending deployment, see the “website-redeploy-golang-org” trigger in the -[Cloud Build console](https://console.cloud.google.com/cloud-build/builds?project=golang-org). +[Cloud Build console](https://console.cloud.google.com/cloud-build/builds?project=golang-org&query=trigger_id%3D%222399003e-0cc5-4877-86de-8bc8f13fd984%22). diff --git a/tour/README.md b/tour/README.md index 0c390d24..3a7c6012 100644 --- a/tour/README.md +++ b/tour/README.md @@ -8,32 +8,26 @@ https://go.dev/tour/ to start the tour. ## Download/Install To install the tour from source, first -[install Go](https://golang.org/doc/install) and then run: +[install Go](https://go.dev/doc/install) and then run: - $ go install golang.org/x/website/tour@latest + go install golang.org/x/website/tour@latest This will place a `tour` binary in your -[GOPATH](https://golang.org/cmd/go/#hdr-GOPATH_and_Modules)'s `bin` directory. +[GOPATH](https://go.dev/cmd/go/#hdr-GOPATH_and_Modules)'s `bin` directory. The tour program can be run offline. -## Contributing +## Send Patches -Contributions should follow the same procedure as for the Go project: -https://golang.org/doc/contribute.html +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://go.dev/doc/contribute. To run the tour server locally: -```sh -go run . -``` + go run . Your browser should now open. If not, please visit [http://localhost:3999/](http://localhost:3999). - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. +## Report Issues The issue tracker for the tour's code is located at https://github.com/golang/go/issues. Prefix your issue with "x/website/tour:" in the subject line, so it is easy to find. @@ -44,7 +38,8 @@ at https://github.com/golang/tour/issues. ## Deploying Each time a CL is reviewed and submitted, the tour is automatically deployed to App Engine -as part of the main go.dev web site. See [../README.md](../README.md) for details. +as part of the main go.dev web site. +See [../cmd/golangorg/README.md](../cmd/golangorg/README.md#deploying-to-go_dev-and-golang_org) for details. ## License