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

1985 Коммитов

Автор SHA1 Сообщение Дата
Russ Cox 7c7e6d209d cmd/golangorg: default to go.dev for testing server
When running server locally, requests for /foo redirect
to /golang.org/foo, and you can specify other hosts at the
start of the URL instead.

Preparing for the move to go.dev, redirect /foo to /go.dev/foo instead.
This just makes local development and testing a little nicer.
It doesn't have any effect on the actual server.

Change-Id: Iabc4186559cbf498f9b361060412702153859a6d
Reviewed-on: https://go-review.googlesource.com/c/website/+/362958
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:40:05 +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 961523a997 go.dev: add /play
This is a replacement for the UI of play.golang.org,
although it still uses play.golang.org as the backend
and probably always will, to keep the playground backend
deployment separate from the rest of the web site.

Change-Id: Ia39000e80368b98d9cc273d246f2c83670fbacc4
Reviewed-on: https://go-review.googlesource.com/c/website/+/364815
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 16:40:00 +00:00
Russ Cox 36da86b3f1 go.dev/_content/css: move header bar to edges of page, like footer
Right now the header is constrained to the middle 75.75em of the page.
That lines up nicely when content is also limited to the middle 75.75em,
but some pages will want to allow a wider viewport, and then it looks weird
to have the content starting to the left of the Go logo and continuing past
the right of the tabs.

Let the header expand to the left and right sides of the page
(up to a margin on wider devices), just like the footer.

Change-Id: Ic667ec8d23dfb06ab6c532caad6b507dd5ce6fe5
Reviewed-on: https://go-review.googlesource.com/c/website/+/364814
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 16:39:59 +00:00
Sean Liao 1765241095 go.dev/_content/blog: fix links
Fixes golang/go#49610

Change-Id: Ie6cf34e259d486c5e756307f966af9e9aaf99b5f
Reviewed-on: https://go-review.googlesource.com/c/website/+/364274
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-11-20 16:08:51 +00:00
Russ Cox 16e8c4c6c0 cmd/golangorg: allow frames from self, for /doc/codewalk/*
Necessary for serving /doc/codewalk/* on go.dev.

Change-Id: I16d7eef08468cc92bcfcd57104329424e41a68a8
Reviewed-on: https://go-review.googlesource.com/c/website/+/362957
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-17 17:48:47 +00:00
Russ Cox 7aec227803 go.dev: turn off share button on golang.google.cn
Right now golang.google.cn serves a copy of golang.org.
Eventually it will serve a copy of go.dev instead.
Prepare for that by disabling the share button on the go.dev
home page when the request is actually for golang.google.cn.

Change-Id: I2b80d066ceb789cd188f6409694bccfed2a87c19
Reviewed-on: https://go-review.googlesource.com/c/website/+/362956
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:43 +00:00
Russ Cox 7008ea24bd cmd/golangorg: refactor go.dev setup to make golang.org merge easier
No semantic changes here, just replacing the godevHandler
function with the same site setup that golang.org already uses.

Change-Id: Id25cf3ce98cc8bea7da4e2b367a05b648a270522
Reviewed-on: https://go-review.googlesource.com/c/website/+/362955
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:38 +00:00
Russ Cox 9d9bbfb1e7 _content/doc/gopher: redirect to blog post
Redirecting to the blog post telling the story of the gopher
is nicer than showing a bare directory listing.

Change-Id: I8b18faed5e4a9cee95d803b4d1c00fd5d5eb5834
Reviewed-on: https://go-review.googlesource.com/c/website/+/362503
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:35 +00:00
Russ Cox cbd24723f5 go.dev/_content: various formatting fixes
Add a standard 1rem margin above and below key block elements like h1, h2, ..., ol, ul, p.
Today it's very inconsistent and because you get a margin from either the block above
or below, it mostly works out, except in certain cases where text gets jammed together
a bit too much.

Add the auto-TOC generator for use in layouts that define #nav
(nothing yet, but golang.org-migrated pages will).

Add "Table of Contents" to the top of the TOC.

Allow pages to opt out of the TOC by setting HideTOC in their metadata.

Make subtitle heading (Version of Jan 1, 2021) line up horizontally with the TOC.

Preparation for the golang.org -> go.dev move.

Change-Id: Ic9121e5b636155c54e487bcb735ac0bc3f958733
Reviewed-on: https://go-review.googlesource.com/c/website/+/362502
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:31 +00:00
Russ Cox 44e466c7fc go.dev/_content/css: various tweaks for golang.org merge
- scroll-behavior: smooth is incredibly frustrating on Macs at least.
  It's way too slow. Go back to the regular behavior when you click a #Link.

- Make printed docs look reasonable (no invisible banner covering up
  content on subsequent pages, no lines of text sliced in half).

- Make .Article margins better defaults. We can always adjust specific
  pages, but these defaults seem to have been overfitted to the specific
  uses of <h1> <h2> and so on in specific pages. The changes do not
  make those pages look noticeably worse, and they do make other pages
  look noticeably better.

Preparation for the golang.org -> go.dev move.

Change-Id: Ia0b5783e9db35785252dc37c443f3f25114f8b4a
Reviewed-on: https://go-review.googlesource.com/c/website/+/362501
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:26 +00:00
Russ Cox a7260f247f go.dev/_content/css: add styles for various golang.org pages
Preparation for the golang.org -> go.dev move.

Change-Id: I8246702e88f47f0c61a4ea4db2e4a6a390e3c90c
Reviewed-on: https://go-review.googlesource.com/c/website/+/362500
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:20 +00:00
Russ Cox cfc856e53a go.dev/_content/js: delete h2 manipulation in misc.js
It's unclear what “correct scroll” means here, but it's definitely
incorrect to blow away any HTML (such as links) in every h2
and replace it with the text-only representation of the original h2.
Delete that code. If we figure out what this means, we can look
for a better way to solve this problem (probably scroll-margin-top?).

Also, make it clearer that the stickyNav setup is a no-op without a sticky nav.

Preparation for the golang.org -> go.dev move.

Change-Id: Ib8930a4e3aba688d645f689d3c2ee90b3e09229f
Reviewed-on: https://go-review.googlesource.com/c/website/+/362499
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:16 +00:00
Russ Cox 111697b119 go.dev/_content/js: set initFuncs in site.js
Needed for godocs.js.

Preparation for the golang.org -> go.dev move.

Change-Id: Ibcfccc2d0b7293220e83b22870848a63cac1b820
Reviewed-on: https://go-review.googlesource.com/c/website/+/362498
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:09 +00:00
Russ Cox b457dda264 internal/short: allow registering on a specific host
This makes internal/short like most of the other registrations.

Preparation for the golang.org -> go.dev move.

Change-Id: I55039d6d668ac38ddb8e2412b7ab7ff44db8dd97
Reviewed-on: https://go-review.googlesource.com/c/website/+/362497
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:48:03 +00:00
Russ Cox 4209fd81f5 internal/dl: make download page testable offline
Added a copy of the datastore content for use offline.
This lets us test download page rendering locally.

Preparation for the golang.org -> go.dev move.

Change-Id: Ic0c49a96329eed4310dd91e03c4ea832189ef65a
Reviewed-on: https://go-review.googlesource.com/c/website/+/362496
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-17 17:47:58 +00:00
Bartłomiej Klimczak 0473aa5d47 _content/doc/articles/wiki: replace "io/ioutil" with "os" package
In Go 1.16 we deprecated "io/ioutil";
see https://golang.org/doc/go1.16#ioutil.
Update the wiki blog post to use the new API instead.

Change-Id: I546c4960ed26845854e6add9469929e68c47abf7
GitHub-Last-Rev: 163df21ffa
GitHub-Pull-Request: golang/website#90
Reviewed-on: https://go-review.googlesource.com/c/website/+/347709
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
2021-11-16 00:39:12 +00:00
Jamal Carvalho 0a378e90f9 go.dev: decrease HaTS sample size
We're getting more responses than we need for go.dev HaTS.
Decreasing the sample size from 40% to 10%.

Change-Id: I9aae64db6a675da27823ad6f4b006f6dd44ce1bf
Reviewed-on: https://go-review.googlesource.com/c/website/+/362954
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-15 15:35:14 +00:00
Katie Hockman b25c3291c4 go.dev/_content/blog: update fuzzing terminology
Updates golang/go#49185

Change-Id: I9b07c0e0a1c034dc49f86c28a9e336458be18bab
Reviewed-on: https://go-review.googlesource.com/c/website/+/363514
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: DO NOT USE <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-12 18:17:11 +00:00
Paschalis Tsilias 0d747a3693 _content/ref/mod: document '-o' flag for go mod vendor
For golang/go#47327

Change-Id: I8f6a4da541be4d95aa8b420b0294a0c1e78b8a0b
Reviewed-on: https://go-review.googlesource.com/c/website/+/362814
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Than McIntosh <thanm@google.com>
2021-11-10 21:49:32 +00:00
Russ Cox 5743d7e577 go.dev/_content/blog: fix pkg links
Fixes golang/go#49507.

Change-Id: Ieb0f8ebcd42efebc6b608091b1a4e263ef5d1c67
Reviewed-on: https://go-review.googlesource.com/c/website/+/363054
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-10 20:25:36 +00:00
Russ Cox 95dd563743 go.dev/_content/blog: add 12years
Happy 12th birthday, Go!

Change-Id: I6cf4928839f53bab276e6fbaefc22624bbc9b255
Reviewed-on: https://go-review.googlesource.com/c/website/+/362959
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-11-10 16:04:25 +00:00
Ian Lance Taylor bbb3d93076 _content/doc/contribute: avoid jargon "CL" in text
In this case just say "suggested change" instead.

For golang/go#18989

Change-Id: Ic52183dbf52e836407609ecd9bad7dcc14ba27df
Reviewed-on: https://go-review.googlesource.com/c/website/+/362355
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Meng Zhuo <mzh@golangcn.org>
2021-11-09 20:11:47 +00:00
Sean Liao 7f7afedada cmd/golangorg: redirect /x/ to pkgsite subrepo page
For golang/go#47281

Change-Id: I065e6cb1d301701304228a3e4f263f3e576f8cbe
Reviewed-on: https://go-review.googlesource.com/c/website/+/355809
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
2021-11-09 19:42:11 +00:00
Julie Qiu 2795752c7d go.dev/_content/blog: add pkgsite search redesign
Change-Id: Idebcd1e8593ecb3ef10a470eeae3b757ec43c55f
Reviewed-on: https://go-review.googlesource.com/c/website/+/361234
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: DO NOT USE <dmitshur@google.com>
Website-Publish: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-11-09 18:58:54 +00:00
Russ Cox 7ba5bfc931 go.dev/_content/css: various cleanups
1. Remove all letter-spacing overrides

Overriding the letter-spacing might have made sense when we
were hard-coding the font (I have my doubts), but it certainly
does not make sense now that we are defaulting to the system font
instead of a hard-coded font.

The effect of the letter-spacing now is to override the font's
kerning tables (as if we could do better!) and gives the site a
bit of an alien look. The only time a letter-spacing override
really works is in ALL CAPS headlines, but we don't have any.

2. Remove font-weight override for article headings

The “large but not bold” headings are another thing that don't
really work consistently in the variety of fonts users might see.
Go back to headings being bold by removing the overrides.

Also rewrite a few font-weight: 400 to font-weight: normal for consistency.

3. Change body text to darker grey

Using 3e4042 for body text is too light and hurts readability.
pkg.go.dev uses 202224 for body text; use that here too.
Global search and replace to keep the same number of colors in our palette.

4. Regularize page max-width, line-height

Solutions articles were allowed to be 75.75rem wide,
but regular articles were capped at 45rem, which is
far too narrow when you're using a large screen.
Let all articles expand to 75.75rem.
(Not sure what is magic about 75.75 but it's used elsewhere too.)

Regular line-height to a default of 1.4 for the whole page.
Rutter's book _Web Typography_ says 1.4 is a good default
for a variety of fonts. The blog was already overriding to 1.4
because that was most readable for the long articles.
Many other elements were using 1.5rem, which can then be deleted.
Article lists were set to 1.45, so delete that too in favor of consistency.
Article text was set to 1.75rem, which is far too wide and hurts
readability (the blog was overriding this specific setting),
so drop that too.

5. Narrow spaces in code font

This rule will let us stop insisting that people write things like

	Use <code>go</code> <code>get</code> to ...

(See for example doc/go1.*.html.)

Change-Id: I2154b03296ae1d56bc9bc416a1e3fb9e930d7d9c
Reviewed-on: https://go-review.googlesource.com/c/website/+/362015
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-09 16:26:20 +00:00
Russ Cox 15a5891cb4 go.dev/_content/css: fix unreadable pull quotes
See https://go.dev/solutions/clis.
The big teal boxes are teal-on-teal quotes.
Make them teal-on-white instead.

Change-Id: I33dd72f172043123d0b21620d75a44ca7a403224
Reviewed-on: https://go-review.googlesource.com/c/website/+/362017
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-09 16:26:15 +00:00
Russ Cox b45f65cacf _content: fix directory listings
The Bytes header and the actual sizes were in different columns.
Also make sure every row has three columns, just in case it matters in the future.

Change-Id: Ifbd56d7426b1e610050ae641e09ac7804ab7070b
Reviewed-on: https://go-review.googlesource.com/c/website/+/362014
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-09 16:26:11 +00:00
Russ Cox 7ae8057659 _content: add id links to security.html headings
Right now temporary ids like tmp_1 are being generated.
Put in something that will be more stable.

Change-Id: Ice223159dab1bdba4fa7126502a727c358bf3c52
Reviewed-on: https://go-review.googlesource.com/c/website/+/362117
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: Heschi Kreinick <heschi@google.com>
2021-11-08 17:37:06 +00:00
Russ Cox 2be698cef0 cmd/golangorg: provide helpful error for git clone https://golang.org/x/repo
People try git clone https://golang.org/x/website (for example)
to clone the website repo. Tell them the right command.

Change-Id: I7dc32190c959afff9908dde0727837b068bfecba
Reviewed-on: https://go-review.googlesource.com/c/website/+/361203
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-11-06 12:35:55 +00:00
Russ Cox 70e627117c cmd/golangorg: fix display of text files
Text files were being displayed raw, e.g.
https://golang.org/src/math/sin.go.
Fix that.

Change-Id: I09dec1d675ca950bf3750c38585cf3995a570134
Reviewed-on: https://go-review.googlesource.com/c/website/+/361206
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-06 12:24:47 +00:00
Russ Cox a66bbe224f go.dev: mv _content/security _later/security
There's a lot of filler still left here.
Move it somewhere it won't serve.

Change-Id: Iaf3fe4cb09e49c536621e64008adbc48d2aeeced
Reviewed-on: https://go-review.googlesource.com/c/website/+/361422
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2021-11-04 22:07:24 +00:00
Russ Cox 37ea4aa3f8 go.dev/_content/security: fix subheading text to make sense
Change-Id: I18659da9850d7f4ea575767b359007fc70f05902
Reviewed-on: https://go-review.googlesource.com/c/website/+/361421
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-04 21:42:40 +00:00
Than McIntosh c863a5098b internal/history: document Go 1.17.3 and Go 1.16.10
Change-Id: Ice3c14820da241b24394bc38ab7b30fad4de656d
Reviewed-on: https://go-review.googlesource.com/c/website/+/361201
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Website-Publish: DO NOT USE <dmitshur@google.com>
2021-11-04 15:32:36 +00:00
Mauricio Alvarado d7068e7b5d go.dev/_content: add the /security page
This change adds the security page over on /security alongside it's
corresponding assets and style changes.

Change-Id: I14e2d43d23e82b39b77bde9cb16520e6f176f481
Reviewed-on: https://go-review.googlesource.com/c/website/+/356511
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Robert Findley <rfindley@google.com>
2021-11-04 14:24:17 +00:00
Jamal Carvalho 4a4e1f21ed go.dev/_content: increase HaTS download survey sample
The HaTS survey for go downloads is not yielding enough
responses. Increased the prompt rate to 20%.

Change-Id: If944cee616c86167bed45e56e558716260bd7cb5
Reviewed-on: https://go-review.googlesource.com/c/website/+/360718
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-02 17:14:42 +00:00
Julie Qiu d4902dd0e1 go.mod,go.sum: update x/build
x/build is updated so that golang.org/x/vuln redirects correctly.

Change-Id: I61feab1a12ff5a2e4734f14e7546b29c0d691a57
Reviewed-on: https://go-review.googlesource.com/c/website/+/360720
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Website-Publish: DO NOT USE <dmitshur@google.com>
2021-11-02 16:29:07 +00:00
Jamal Carvalho 4ff95d6465 go.dev: fix uncaught JS error
The searchBox.js code throws an error when no
search form is present on the page. Return early
when the form is not present to prevent the error.

Change-Id: I8a77d34fad185d5c59ab10bce88776d363bb3bef
Reviewed-on: https://go-review.googlesource.com/c/website/+/359215
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-10-29 16:18:54 +00:00
Jamal Carvalho 103d89b8bc go.dev: fix go playground on homepage
Copied the playground example files to the go.dev content
directory to fix the homepage playground. This works locally
because requests to /doc are passed to the golang.org content
directory but breaks on app engine when requests go to go.dev/doc.

Change-Id: I858b7fca905bbacd0acbf8ea33d1a5188fbd3773
Reviewed-on: https://go-review.googlesource.com/c/website/+/359214
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: DO NOT USE <dmitshur@google.com>
2021-10-27 20:25:01 +00:00
Jamal Carvalho 714a425135 go.dev/_content: copy golang.org playground onto go.dev homepage
HTML and styles for the go.dev playground are copied from golang.org
so that a playground section appears between the testimonials and
"What’s possible with Go" sections.

Change-Id: Ic7648462c7c27b22c057e05b3c0e8e2303d9643c
Reviewed-on: https://go-review.googlesource.com/c/website/+/352549
Trust: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-10-27 17:22:43 +00:00
Alice Merrick 94870a36c7 blog: add 2021 Go Developer Survey launch announcement
Adds an announcement for the Go Developer Survey 2021 launch

Change-Id: I35a19b7c34239b38612b7a4608f4fe555b09055e
Reviewed-on: https://go-review.googlesource.com/c/website/+/357129
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Website-Publish: DO NOT USE <dmitshur@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-10-26 16:00:26 +00:00
Julie Qiu 22652b4484 _content: update security policy
The golang.org/security page is updated according to the new security
policy.

Fixes golang/go#44918

Change-Id: I66306aa0368ee12f89f68f97a2ae1412d98da628
Reviewed-on: https://go-review.googlesource.com/c/website/+/352029
Trust: Julie Qiu <julie@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2021-10-25 18:51:59 +00:00
Matt T. Proud 6063efbf98 blog: clarify what is meant by equality in article
The blog article https://go.dev/blog/go1.13-errors explains when package
errors use a user-authored Is method on an error. It does this in the
context of error value equality. Because errors are often implemented as
pointer values (and receivers), which may have non-obvious semantics to
newcomers, this presents a good opportunity to remind the reader what
equality means in such cases.

This commit is largely cosmetic and provides a link back to the relevant
part of the language specification.

Change-Id: I0e312fa1385e7caa9944eaff4ac788c91c3294dd
Reviewed-on: https://go-review.googlesource.com/c/website/+/358354
Reviewed-by: Jean de Klerk <deklerk@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Trust: Jean de Klerk <deklerk@google.com>
Run-TryBot: Jean de Klerk <deklerk@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-10-25 17:16:39 +00:00
Jay Conrod 281050ffdd _content: change 'go get' to 'go install' where appropriate
For golang/go#43684

Change-Id: Ifdb0695d15961150960f7be3eb0fb44ac1f0d4d2
Reviewed-on: https://go-review.googlesource.com/c/website/+/355249
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-10-12 18:30:24 +00:00
Rodolfo Carvalho c8768b9a37 _content/ref/mod: fix typo
Change-Id: I5581e2e62ab449826cc6086cd1948fdd7021563f
GitHub-Last-Rev: f1e468fb0c
GitHub-Pull-Request: golang/website#99
Reviewed-on: https://go-review.googlesource.com/c/website/+/355030
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Trust: Daniel Martí <mvdan@mvdan.cc>
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
2021-10-11 18:13:30 +00:00
Michael Anthony Knyszek 3b9afa944d internal/history: document Go 1.17.2 and Go 1.16.9
Change-Id: I555f2e1c396ceffc7819cf423226f556bb4af5f5
Reviewed-on: https://go-review.googlesource.com/c/website/+/354570
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
Website-Publish: DO NOT USE <dmitshur@google.com>
2021-10-07 22:23:32 +00:00
Dmitri Shuralyov 86761ae22c go.dev/_content/blog: update build constraints in fuzz-beta post
CL 351569 updated this blog post to use gotip without arguments,
since the dev.fuzz branch has been merged to the main branch and
is slated to be included in Go 1.18.

Update the build constraint in the shown example accordingly,
since the gofuzzbeta constraint is no longer set as of CL 351118.
Suggest the use of a go1.18 build constraint instead.

While here, also update to the newer go install @latest
syntax for downloading the gotip command, for reasons
similar to what's described in CL 346091.

For golang/go#47037.
Updates golang/go#48080.

Change-Id: Icbf3d3ad5ef5532063ca3e093eed330f7ea0c0d9
Reviewed-on: https://go-review.googlesource.com/c/website/+/353430
Website-Publish: DO NOT USE <dmitshur@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Katie Hockman <katie@golang.org>
2021-10-04 19:36:32 +00:00
180909 558b9da86d _context/doc/modules: add GOPRIVATE to managing-dependencies
Fixes golang/go#44240

Change-Id: I86d07db963fb0cebd5e6560422a2500d9b0d5164
Reviewed-on: https://go-review.googlesource.com/c/website/+/348990
Reviewed-by: jiahua wang <wjh180909@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Steve Traut <straut@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-10-01 16:01:09 +00:00
Katie Hockman 53e4d521b8 _content/fuzz-beta.article: update after merge to master
Change-Id: I8392dd319b8bd09b95d4f88869acf5177ef500a2
Reviewed-on: https://go-review.googlesource.com/c/website/+/351569
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-09-22 22:15:30 +00:00
Li-Yu Yu 7343e33726 _content, go.dev: fix hamburger menu
Follow up on https://golang.org/cl/343469.

Use different classes for the hamburger menu to set
event listeners on golang.org & go.dev to avoid
(mis-)listing the paths.

Fixes golang/go#47862.

Change-Id: I4bbf856cd86583bea402b1869583e90799a7d1f9
Reviewed-on: https://go-review.googlesource.com/c/website/+/344309
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-09-20 13:40:05 +00:00