lib/godoc/images/play-link.svg moves to go.dev/_content
and the one reference in go.dev/_content/css/styles.css is fixed.
The rest is all dead files.
Change-Id: Ic2b582855b976387e0a4d2cbd93e50942071ae31
Reviewed-on: https://go-review.googlesource.com/c/website/+/365096
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Now that there is one site, update all golang.org links to go.dev.
But for any links being served from go.dev, make host-relative,
so that when serving golang.google.cn, we stay on that host as
much as possible.
Change-Id: Id6e1303059b5522846a64202bc1a8b81dc3854cd
Reviewed-on: https://go-review.googlesource.com/c/website/+/365095
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
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>
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>
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>
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>
Fixesgolang/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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>