Граф коммитов

23 Коммитов

Автор SHA1 Сообщение Дата
Russ Cox e2dd66fc34 _content: serve wiki pages on go.dev
The wiki pages have been copied to go.googlesource.com/wiki
and will be code reviewed using Gerrit, like other Go repos.
Unlike other Go repos, self-review will be permitted, and
there is no requirement for Googlers to be involved to make a change.
These relaxations are possible because the wiki has no production code.
The set of wiki +2'ers is a superset of the usual code +2'ers.

Fixes golang/go#61940.

Change-Id: I01823720091fbaa24e95e9c82abeaadba867a17c
Reviewed-on: https://go-review.googlesource.com/c/website/+/518297
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-15 02:06:41 +00:00
Russ Cox 90162a8e6f _content: move security to doc/security, with redirects
go.dev/security made sense as a URL when it was the security policy,
which might be considered not quite user-facing documentation.
But now it has grown into lots of definitely user-facing documentation,
so it should be in /doc with all the other user docs.

Move /security to /doc/security with redirects.

Change-Id: I4747bbd0d1c110a4c7f0ae2fe0098326cc8637b8
Reviewed-on: https://go-review.googlesource.com/c/website/+/548119
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
2023-12-08 03:22:56 +00:00
Russ Cox 0ad6f295fa _content: move testing/coverage to doc/build-cover, with redirects
By default documentation should be in doc/.
There is no strong reason to keep testing in its own tree,
so move the one file here, /testing/coverage/,
to doc/build-cover, which better describes what
this is (building with coverage, as opposed to go test -cover).
Add a redirect to keep existing links working.

Change-Id: Ic3a3dfa9ae98788a0a1558bac0ce3934b1ead815
Reviewed-on: https://go-review.googlesource.com/c/website/+/548118
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-12-08 03:22:54 +00:00
Dmitri Shuralyov a697538369 internal/backport: delete
Now that the deploy happens with Go 1.19, it's viable to start using
these packages from the standard library instead of their backported
temporary copies.

Keeping Go 1.18 happy during its last two months of support requires
a tiny complication in pkgdoc package. An alternative path is to not
drop internal/backport/go/doc and all of its dependencies right away,
but getting to zero backported packages sooner was hard to resist...

For golang/go#51800.

Change-Id: Ieb7a137a033d6b6850dfc019c8c0c767756cc30d
Reviewed-on: https://go-review.googlesource.com/c/website/+/456522
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
2022-12-12 20:37:14 +00:00
Russ Cox 38c9a97a25 internal/redirect: handle go.dev/cl/c/... which keeps popping up
Some shorteners blindly rewrite go-review.googlesource.com/ to go.dev/cl/
but Gerrit has changed the URL schema to start with c/<repo>/+/<id>
instead of just <id>. So we now see URLs like go.dev/cl/c/go/+/12345.
Assume that the leading c/ means it is for Gerrit and redirect accordingly.

Change-Id: I72aa365681145432a6e50eb1ba7b1a85d191a314
Reviewed-on: https://go-review.googlesource.com/c/website/+/447996
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-09 14:28:26 +00:00
Hana (Hyang-Ah) Kim 6b9583b283 _content/ref: specify redirect for /ref and /ref/ using /ref/index.md
We want both `/ref` and `/ref/` to point to `/doc/#references` section.
All documents for /ref/* are available from this unified website, so we
can set up a redirect rule using the native redirect support provided by
the internal/web package instead of relying on the internal/redirect rule.

Fixes golang/go#53243

Change-Id: Ibed1aefc82f8b93ae14775efbb456b1571053eda
Reviewed-on: https://go-review.googlesource.com/c/website/+/413914
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-06-24 14:11:52 +00:00
Frederik Zipp 4056b246ea all: fix a lot of typos
Change-Id: I0754d18f4c3c3d5dfa0c34b4bc154a35ac20b917
Reviewed-on: https://go-review.googlesource.com/c/website/+/411794
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-06-15 16:32:49 +00:00
Roland Shoemaker 3a0af067d4 internal/redirect: support cl patchset redirects
Previously redirects of the format cl/1234/4 would throw a 404, this
change allows this.

Fixes golang/go#52023

Change-Id: Iedbdf340164b2a1e11c1c4137c93655b50070f91
Reviewed-on: https://go-review.googlesource.com/c/website/+/396494
Reviewed-by: Russ Cox <rsc@golang.org>
2022-04-11 17:22:18 +00:00
Dmitri Shuralyov 0dd6a27c6a internal/redirect: add special case for /issues/new for multiple templates
For golang/go#29839.

Change-Id: Ic6ff96d0d1321946df7f19a9f4af889e90255cb1
Reviewed-on: https://go-review.googlesource.com/c/website/+/369154
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-12-06 22:18:50 +00:00
Russ Cox c01d555894 talks: serve go.dev/talks for talks.golang.org content
This is the last user-facing golang.org domain.
Now everything is on go.dev.

Change-Id: I8d9f4b7609a019f077848825cbd417d38058a5ac
Reviewed-on: https://go-review.googlesource.com/c/website/+/365494
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 20:36:15 +00:00
Russ Cox e77adb1f30 tour: serve from cmd/golangorg as go.dev/tour
tour.golang.org is the last independent server in this repository
and almost the last golang.org domain with user-facing content.
(talks.golang.org remains.)

We need to keep golang.org/x/website/tour as a runnable binary,
but move the logic into internal/tour so it can be used from both
the tour binary and cmd/golangorg.

After this is deployed, we will need to delete the current tour app
from the golang-org project, and then requests for tour.golang.org
will default to the main server (cmd/golangorg).

This will make the tour available in China for the first time,
at golang.google.cn/tour.

Change-Id: I0f025d8ae89e12489d26bb3bc380a833eeb57bcc
Reviewed-on: https://go-review.googlesource.com/c/website/+/365100
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:43:07 +00:00
Russ Cox cecdbb6e8e website: merge golang.org → go.dev
As described in https://go.dev/blog/tidy-web,
redirect golang.org to go.dev.
The golang.org home page is retired -
go.dev now has all the same info and links,
and it doesn't have ten-year-old videos of me.
All the other golang.org pages are now served
directly from go.dev, styled differently but with
the same content.

A followup CL will merge the _content directories.

Change-Id: Ib7f3d951842c021280981f9b926c4943f4d9cb52
Reviewed-on: https://go-review.googlesource.com/c/website/+/364859
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:40:01 +00:00
Russ Cox 509175483b cmd/golangorg: use embedded content on App Engine
Change-Id: If211bdb2ba60fbb799cb4dfe67fd066094afc40f
Reviewed-on: https://go-review.googlesource.com/c/website/+/343936
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-08-23 15:30:36 +00:00
Russ Cox 45603b6afa internal/redirect: gofmt
Change-Id: If4bbcc78c0c1aa35531ceacd43399f52bc1a0174
Reviewed-on: https://go-review.googlesource.com/c/website/+/343938
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-08-20 20:20:31 +00:00
Russ Cox 6c6d3e7c40 cmd/golangorg: move blog from blog.golang.org to go.dev/blog
This is the first of a sequence of consolidations of web sites into
the single site go.dev. An accompanying blog post (next CL) will
explain the change.

The blog/_content tree moves to go.dev/_content/blog.
The *.article files were converted to *.md files using rsc.io/tmp/blog2md.
The old dot directives are now template function invocations,
so that blog content files are now exactly the same format and
semantics as regular site content files.

All the old blog redirects are carried forward, of course.

Also add exhaustive test that every .md file renders correctly.

Also rename rawhtml to raw, because it gets used for raw Markdown too.
The raw Markdown issue is working around a bigger problem
(html/template is not really right for Markdown) that we will have
to solve at some point, but not in this CL.

Change-Id: Ifa9b3b8d656a72af30d0d4e57e4c7bc8dacbc386
Reviewed-on: https://go-review.googlesource.com/c/website/+/342091
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-08-18 19:48:35 +00:00
Russ Cox 30658dff6b cmd/golangorg: factor out main handler setup
Also avoid use of http.DefaultServeMux entirely, for clarity about what is registered.

Change-Id: Ibd7ccd7a6c3cb6b79e94b77570ad016a1be11f0c
Reviewed-on: https://go-review.googlesource.com/c/website/+/328012
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-17 16:55:37 +00:00
Russ Cox d831351689 all: make compatible with Go 1.15
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>
2021-06-15 02:35:50 +00:00
Russ Cox 72dd19b3a4 cmd/golangorg: remove various special-case handlers
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>
2021-06-08 20:19:34 +00:00
Michael Pratt 7e301e09e5 internal/redirect: bump bigEnoughAssumeRietveld
Gerrit CL numbers now exceed 300k, so new CL numbers are landing on the
Gerrit/Rietveld disambiguation page.

Bump bigEnoughAssumeRietveld to 4M (approximately the max before we need
to handle subrepos) and update the table. Now we won't need to deal with
this again for quite a while.

Change-Id: I6ddd8cdd19012f0b58e39c2df76ff23f376c2f1b
Reviewed-on: https://go-review.googlesource.com/c/website/+/300089
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2021-03-09 18:38:05 +00:00
Russ Cox d6a1a7b134 internal/redirect: add minor fixes from golang.org/x/tools/godoc/redirect
Change-Id: I7436b87c2fd952ad71f25affaf74944b6ec51e6f
Reviewed-on: https://go-review.googlesource.com/c/website/+/293425
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-02-24 17:35:54 +00:00
Julie Qiu 9bb0e2307d all: replace godoc.org links with pkg.go.dev
Change links from godoc.org to pkg.go.dev.

For golang/go#36106

Change-Id: Ic3ec03efc265cdc332027d538b0c5d4d91bdac24
Reviewed-on: https://go-review.googlesource.com/c/website/+/275195
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-07 16:54:58 +00:00
Channing Kimble-Brown 1459be3397 cmd/golangorg, internal: use newly copied x/website/internal packages
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>
2019-01-29 15:17:29 +00:00
Channing Kimble-Brown b018bd1d29 internal: copy x/tools/godoc/{dl,env,proxy,redirect,short} packages
These files from x/tools commit
0a99049195aff55f007fc4dfd48e3ec2b4d5f602 are being added here
both as a step toward fixing the broken app engine build (using
go build -tags=golangorg requires access to memcache) and towards
the long term goal of removing files and packages that exist solely
to serve the website from x/tools. The next step will be changing
the import paths to get the build working again.

Updates golang/go#29206

Change-Id: Ie30b7776f30cda14c7fe9827941c623bc5c5c587
Reviewed-on: https://go-review.googlesource.com/c/159917
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2019-01-29 15:14:25 +00:00