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

1985 Коммитов

Автор SHA1 Сообщение Дата
Russ Cox 081156a208 website: publish all commits, eliminating Website-Publish+1 vote
The main point of Website-Publish+1 was to manually avoid
a race in Cloud Build when multiple commits land. But now
cmd/locktrigger takes care of that race automatically, so there
is little point to Website-Publish+1 now. Stop looking for it.

(If a commit landed without Website-Publish+1, it would still be
published with the next Website-Publish+1 commit, so it was
no real restriction on who can publish content.)

I considered adding a rule like "DO NOT PUBLISH" in a commit
message means not to publish the commit, but once it lands,
again the next publishable commit is going to publish all
previous commits, so even the possibility of landing such commits
puts the repo in a very fragile state.
Better not to support that idea at all.

Fixes golang/go#36707.

Change-Id: Icfe3bcdb0003608ff84bb300c43b61b542236571
Reviewed-on: https://go-review.googlesource.com/c/website/+/368366
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-12-06 20:46:19 +00:00
Russ Cox c386b489b9 cmd/locktrigger: add fix for Cloud Build race
When a project uses “continuous deployment powered by Cloud Build”,
the deployment is a little bit too continuous: when multiple commits
land in a short time window, Cloud Build will run all the triggered
build jobs in parallel. If each job does “gcloud app deploy”, there
is no guarantee which will win: perhaps an older commit will complete
last, resulting in the newest commit not actually being the final
deployed version of the site. This should probably be fixed in
“continuous deployment powered by Cloud Build”, but until then,
locktrigger works around the problem.

Use locktrigger in cmd/golangorg/cloudbuild.yaml to ensure that
when multiple commits race, the newest one always runs its
go-app-deploy.sh last.

Change-Id: I5ca340250d0a3b7853fc478d35caffdd0163bb0f
Reviewed-on: https://go-review.googlesource.com/c/website/+/368365
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-12-06 20:42:35 +00:00
Dmitri Shuralyov 577a9fdbc0 website: update deploying sections in README files
Use the README in cmd/golangorg directory as the canonical location
for documenting the deployment process for websites served by that
command. The top-level README now redirects to it, just like the
README in tour directory.

Add more context on how the website uses tests to ensure that deploys
can be done safely.

While here, also shorten various URLs to use the new go.dev domain.

For golang/go#36707.
Updates golang/go#39687.

Change-Id: If5cf7a74b19830540b29612de37286c5f14244a1
Reviewed-on: https://go-review.googlesource.com/c/website/+/367994
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-12-06 17:29:19 +00:00
Russ Cox 1167ccddc1 _content: update /play/ url to show ?v= for gotip usage
Show ?v=gotip when 'Go dev branch' is selected in the dropdown,
and then also add it to playground shares.

Change-Id: I38e74a9cc6285b71269f9edf2e958e1bb46def55
Reviewed-on: https://go-review.googlesource.com/c/website/+/368361
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-12-06 15:58:24 +00:00
Jamal Carvalho a78844bf24 _content/js: fix tour playground
Fixed a malformed request URL when options.backend is undefined.

Fixes golang/go#49936
Fixes golang/tour#1281

Change-Id: I9c2c29d2d67e3bffe0d490517f6a9168a6d4dc46
Reviewed-on: https://go-review.googlesource.com/c/website/+/368914
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-03 20:47:54 +00:00
Michael Anthony Knyszek 9a694f2900 internal/history: document Go 1.17.4 and Go 1.16.11
Change-Id: Ie75a58e316eea0cc9777cadf72d50ff45f8ca0a7
Reviewed-on: https://go-review.googlesource.com/c/website/+/368734
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Website-Publish: Dmitri Shuralyov <dmitshur@google.com>
2021-12-02 23:40:00 +00:00
Carlos Amedee ab9c578b42 cmd/golangorg: create datastore connection bofore using it
This change creates a datastore connection before it is used by any of
the handlers.

Change-Id: I694f3c13bac0433935cf7879d90e7f6ca9b48eca
Reviewed-on: https://go-review.googlesource.com/c/website/+/368974
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Website-Publish: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2021-12-02 23:07:11 +00:00
Jamal Carvalho daaa3e0ec4 _content/learn: add a tutorials section
Adds a section with cards for Go tutorials below the
Google Cloud Self-Paced Labs.

Change-Id: I459f5fab9052b84a07ff2509ffbc41c5ff8bdb75
Reviewed-on: https://go-review.googlesource.com/c/website/+/367914
Trust: Jamal Carvalho <jamal@golang.org>
Trust: Nooras Saba‎ <saba@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-12-02 19:45:23 +00:00
Alberto Donizetti d8d1119db1 tour: move img/tree.png into static/img
The tree image at the concurrency/7 is not visible because the lessons
uses

  .image /tour/static/img/tree.png

but /img/tree.png was moved at the top level content dir. Move the
image into static/img to fix the link, we don't need an additional img
folder at top level.

Fixes golang/tour#1277
Fixes golang/tour#1274

Change-Id: I0a7d2cada7f33e7b84aac1bc6844e7f45754a1ec
Reviewed-on: https://go-review.googlesource.com/c/website/+/367334
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-12-02 09:59:10 +00:00
Alexander Rakoczy f750826771 tour/content: remove links to broken translations
These translations have been unavailable for some time.

Updates golang/tour#1039
Fixes golang/go#49900

Change-Id: I511848e600d4cb49a60cd1ce6778805e093ab0d9
Reviewed-on: https://go-review.googlesource.com/c/website/+/368138
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Website-Publish: Dmitri Shuralyov <dmitshur@google.com>
2021-12-01 19:34:00 +00:00
Russ Cox c937063ca3 _content/tour: fix links, fix CSP policy for tour
Some links were missing the /tour/ at the front.

The tour also has links like <a href="javascript:next()">, which require
us to set unsafe-inline (or else enumerate the SHA256 of every link)
in the CSP header.

Also make the local server a bit more tour-friendly.

Fixes golang/go#49880.

Change-Id: Ice746571db1a34e1c02b4b2a16c4e9f30dc164d1
Reviewed-on: https://go-review.googlesource.com/c/website/+/368034
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>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-30 23:33:38 +00:00
Russ Cox 90f8f780d1 _content: fix go.dev/play share not to reload page
Mainly the JS invocation was set up wrong.

Also add the display box for the share URL back,
and style the share URL box and the Go release box
the same as the example selector box.

Also hide the example box when sharing.
This used to happen somewhat accidentally
on play.golang.org. Make it intentional.

Fixes golang/go#49766.

Change-Id: Ib297feff123f6fdabebe24cf868a54874c5afc83
Reviewed-on: https://go-review.googlesource.com/c/website/+/368014
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-30 23:33:37 +00:00
Russ Cox 4c75404100 _content/css: hide scroll bars under each line number on phone screens
jquery-linedtextarea sets the line numbers to be width 3%
because then it can set the main box to be 97%.
Ideally we'd do something like 3ex and 100% - 3ex
but I've failed to get that to work with the jquery we are using.

On very narrow screens like phones, 3% is too narrow for the
line numbers, and the browser shows a tiny little horizontal
scroll bar under each line number. Make those go away.

Fixes golang/go#49829.

Change-Id: Iccb51a885076d4cbdf91429485960f5ab7790f8b
Reviewed-on: https://go-review.googlesource.com/c/website/+/367976
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-30 23:33:35 +00:00
Russ Cox 316c5fd39f _content/js: fix typing blank line at bottom of playground in Safari
I don't understand why this is necessary, but empirically, it fixes the problem.

Fixes golang/go#49794.

Change-Id: I1258d26d1540a178b864d373038e297c14e8e6ff
Reviewed-on: https://go-review.googlesource.com/c/website/+/367975
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-30 23:33:34 +00:00
Russ Cox 78289dfb2f _content/css: fix <pre> font size
Should use rem, not em.
Otherwise code blocks like on go.dev/blog/context have text that is too small.

Fixes golang/go#49833.

Change-Id: Ib8b3ca6385dd1e0e3ce7861ea23e3e5d68ea21ed
Reviewed-on: https://go-review.googlesource.com/c/website/+/367974
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-30 23:33:33 +00:00
Russ Cox 3499583bb4 go.dev: hide annoying vertical scroll bar in Try Go hello world
The window is sized properly to hold the text but we still
get a scroll bar that wiggles the text box a line or so.
Make it disappear.

Also correct the descriptions of the nearby buttons.

Fixes golang/go#49770.

Change-Id: I2c0ee6cba3b3160aa0666c3e48566f2f4940b3db
Reviewed-on: https://go-review.googlesource.com/c/website/+/366995
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>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-30 18:41:49 +00:00
Russ Cox 8a86c4a6db website: remove banner
We still believe very much that Black Lives Matter
and that the Equal Justice Initiative and other causes
are worthy of support. We have made that point.
For most users the banner has now faded into the
background and goes unnoticed.
As part of the overall site revamp merging golang.org
with go.dev, remove the banner.

Change-Id: I82245fab0a9c5fcfdaca5ddfd8d64d503d4df096
Reviewed-on: https://go-review.googlesource.com/c/website/+/367915
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-30 18:33:03 +00:00
Russ Cox 7b05988451 _content: make go.dev/play code box bigger
On go.dev/play, make code box 50% bigger by default,
and lower the "tall screen" threshold (where it gets even bigger) too.

Fixes golang/go#49769.

Change-Id: Iddd3138cc5674a997023ec955caf768e2a70d284
Reviewed-on: https://go-review.googlesource.com/c/website/+/366978
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-30 18:12:47 +00:00
Russ Cox bd4a046458 _content: add more playground examples
These are copied from golang.org/x/playground/examples.
They used to be on play.golang.org, so add them to go.dev/play.

Fixes golang/go#49743.

Change-Id: I82dabdca9f1ac93fff34d7846e45a90b9a1ecf5a
Reviewed-on: https://go-review.googlesource.com/c/website/+/366414
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-30 18:12:37 +00:00
Russ Cox 8ef0b27a15 _content: remove go.dev download button "smarts"
The go.dev front page download button changes what links to
based on JS: if this is a Mac, it links to the darwin/amd64 pkg.
Otherwise it links to the windows/amd64 msi.

This is obviously wrong on all non-Mac, non-Windows systems,
such as Linux, FreeBSD, phones, tablets, and so on.
None of them want the Windows MSI.

It is also less obviously wrong on all arm64 Mac and Windows systems,
of which there will be more and more.

Changing whether the button downloads a file or goes to a new page
based on browser properties also makes it very difficult to write
documentation about how to install Go, since "click Download"
does different things for different people.

It's also very difficult to tell what architecture the browser is, by design.
So our chance of linking to the right download is going to plummet as
arm64-based systems proliferate.

Instead, just link to the download page and let people find what they need.

Fixes golang/go#49765.

Change-Id: I0761fddffaef3a36087fd050ae276111339ea2dc
Reviewed-on: https://go-review.googlesource.com/c/website/+/366976
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-30 18:11:58 +00:00
Russ Cox 646b4a64d9 _content/css: let the go.dev header scroll away
Otherwise anchored links end up scrolling the page so that the
thing we want to see is behind the header.
We used to have JS cleverness for this, but that broke other
parts of the page - in particular, it destroyed any HTML inside
<h2> tags and also only applied to <h2> tags - so it was
deleted in CL 362499.

Let's just be less clever and let the header scroll off the page.
That is nicer for viewing content anyway.

Fixes golang/go#49754.

Change-Id: I14aa9d8e2626d917fbace14d911891777aa6a257
Reviewed-on: https://go-review.googlesource.com/c/website/+/366974
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-30 18:11:47 +00:00
Russ Cox 1616309be8 _content: adjust footer
Change footer About heading to link to /project.
Linking to /about was always mainly about pkg.go.dev,
and now it redirects to pkg.go.dev/about, so that's clearly wrong.
But we need a link to somewhere, and we also need a link to /project
(which used to a be a top-level heading on golang.org),
so it's a good match.

Add Standard Library to Packages section.

Add Help to Get Started section.
(Used to be a top-level heading on golang.org.)

For golang/go#40785 (but probably more to do there).
Fixes golang/go#49737.
Fixes golang/go#49768.

Change-Id: I4a0837aaaa89b3bd79bda7a55bcff3a5ef9e206b
Reviewed-on: https://go-review.googlesource.com/c/website/+/366577
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-30 18:10:18 +00:00
Russ Cox 7f5094fc5c cmd/golangorg: add support for multiple play backends
This lets people choose between the release version of Go (play.golang.org)
and the dev branch version (gotipplay.golang.org).
After CL 365854 goes live, it will offer Go 1.17, Go 1.16, and Go dev branch.

Change-Id: I7480a0cb4f1b09636f5728c41af507aac5a72026
Reviewed-on: https://go-review.googlesource.com/c/website/+/366056
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-30 18:10:09 +00:00
Katie Hockman b0a4f90f12 _content/doc/fuzz: create index.md with glossary
Link to /doc/fuzz from /doc#learning.

Updates golang/go#48255

Change-Id: Ib93373f8e1fb24144dbcded5d5656be575f6bc2e
Reviewed-on: https://go-review.googlesource.com/c/website/+/363754
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Website-Publish: Dmitri Shuralyov <dmitshur@google.com>
2021-11-30 16:44:07 +00:00
Alberto Donizetti 24816dea19 go.dev: fix link to playground blog post
The link to the playground blog post currently 404s because of a
missing /blog/ prefix.

Change-Id: Id676da0cfb9d0fe5345ba4ddd776fe76eb01591e
Reviewed-on: https://go-review.googlesource.com/c/website/+/367335
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-11-29 02:12:03 +00:00
Russ Cox e0eb9bf3b1 tour: fix formatting endpoint
go.dev uses /_/fmt, not /fmt.
Fix the JavaScript and then the standalone tour binary to both use /_/fmt too.

Fixes golang/go#49746.

Change-Id: Ic59c6afb99748ed8c3e74c69c2d753671d92432b
Reviewed-on: https://go-review.googlesource.com/c/website/+/366977
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-25 00:26:26 +00:00
Russ Cox 4cbd189349 cmd/golangorg: redirect play.go.dev etc to go.dev/play etc
People might learn to type go.dev instead of golang.org
but not the subdirectory part, meaning we expect to get
requests for things like play.go.dev. Make them work.

Change-Id: I2827fff42e896abe2df409ddc4f67e28d881ae95
Reviewed-on: https://go-review.googlesource.com/c/website/+/366375
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: Jamal Carvalho <jamal@golang.org>
2021-11-24 23:47:34 +00:00
Russ Cox 1929a4cfa1 _content/js: make tab on selection undoable
People often highlight a selection and type tab, hoping to indent it.
Instead, the editor replaces it with a tab. That's fine - some editors work that way.
But the old implementation did not push that edit onto the undo stack,
so that there was no way to get the deleted selection back. Fix that.

Fixes golang/go#41037.

Change-Id: I9f2aa94ac389a3905d07411b0a156dbc66a7ec8a
Reviewed-on: https://go-review.googlesource.com/c/website/+/366535
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: Jamal Carvalho <jamal@golang.org>
2021-11-24 23:39:28 +00:00
Bharath Kumar Uppala 7cb377cc41 website: improve error message on go.dev/play UI when server returns 413 while sharing snippet
The current error message handling on go.dev/play UI always displays same message for all http status codes other than 200.
Error handling mechanism on UI is updated to display "Snippet too large to share." when server responds with status code 413 while sharing a snippet.

Fixes golang/go#49527

Change-Id: Id7d617b7f363bc579b4d7e4be21e8443c44243e6
Reviewed-on: https://go-review.googlesource.com/c/website/+/366714
Reviewed-by: Russ Cox <rsc@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-24 23:20:33 +00:00
Russ Cox da1ce712a5 internal/backport/fmtsort: delete tests
There is something wrong with the tests, and we don't really need them.
This code was just copied from the main repo's internal/fmtsort in order
to support internal/backport/text/template. If the template tests are happy,
we are happy.

Fixes golang/go#49732.

Change-Id: I109e13e4ec7c40ab06d84cba05fcdcdf8ba0c8d9
Reviewed-on: https://go-review.googlesource.com/c/website/+/366954
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-24 22:58:50 +00:00
Dmitri Shuralyov c93df9865d _content/blog: restore previous talks URL in tidy web post
This change was made inadvertently as part of CL 365495.

Change-Id: Iaee3a74d4e032ef497d278dd8e57860058765aca
Reviewed-on: https://go-review.googlesource.com/c/website/+/366554
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-23 21:21:21 +00:00
Russ Cox 5db4ed2624 _content: redirect /about to pkg.go.dev/about
This page has always been mostly about pkg.go.dev.
CL 364974 moves it there. Redirect to that one to
avoid breaking any links.

Change-Id: Ic584e0faa119dca17d5e74ed50b3fabbc6eb6e5f
Reviewed-on: https://go-review.googlesource.com/c/website/+/365094
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: Jamal Carvalho <jamal@golang.org>
2021-11-23 18:39:50 +00:00
Sean Liao 12d9285809 _content: link to atom feed
Fixes golang/go#47795

Change-Id: I6a4561c8e49a9c799f34347e166cc4813f59c2fc
Reviewed-on: https://go-review.googlesource.com/c/website/+/364276
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-23 15:10:13 +00:00
Russ Cox ad69553815 internal/tour: fix go.dev/tour
The playground js was coming from
godoc instead of the updated copy in go.dev.

Change-Id: I26be8634b0e5d453b966be758f08c15b4bc7ca72
Reviewed-on: https://go-review.googlesource.com/c/website/+/366376
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-23 03:31:47 +00:00
Russ Cox d122f972e5 _content/doc: fix download buttons for go.dev/dl/
Must use relative path to get to download site.
(https://go.dev/ would work most of the time,
but not when using golang.google.cn/dl/.)

Fixes golang/go#49726.

Change-Id: I8b47f5692eabf172bf45a48ce32c927ed705199c
Reviewed-on: https://go-review.googlesource.com/c/website/+/366394
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
2021-11-23 03:18:54 +00:00
Russ Cox b8a52b2c94 _content: replace talks.golang.org links with go.dev/talks
Change-Id: Id33adb085a38f879694cc8c4e241f9e8ab805fdb
Reviewed-on: https://go-review.googlesource.com/c/website/+/365495
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: Jamal Carvalho <jamal@golang.org>
2021-11-22 20:36:16 +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 e219555f0b _content/talks: add talks.golang.org content
Copied from golang.org/x/talks/content at a07c284b (Feb 8 2021)
and from golang.org/x/tools/cmd/present/static and templates
at 43b469a3 (Nov 17 2021).

Adds 80MB (uncompressed) to the repository and the
cmd/golangorg binary.

Change-Id: I4949e41bf6f3ccc28ea13303d79ed6931abe86e7
Reviewed-on: https://go-review.googlesource.com/c/website/+/365135
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:09 +00:00
Russ Cox 91661c0642 internal/talks: copy golang.org/x/tools/cmd/present/dir.go
This is an almost unmodified copy of
golang.org/x/tools/cmd/present/dir.go
as of 43b469a (Nov 17 2021).

The only modification is adding a '//go:build ignore' line.

Checking this file in will let the next CL show the diffs
for adaptation to x/website.

Change-Id: I808886338df44878b728be096b91b6aa8179be56
Reviewed-on: https://go-review.googlesource.com/c/website/+/365134
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:08 +00:00
Sean Liao c5047a94bc internal/blog: fix atom feed self link
Fixes golang/go#49595

Change-Id: Ie28221bf3dfe804ce3124040b15569a63ace56fa
Reviewed-on: https://go-review.googlesource.com/c/website/+/364275
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-22 17:28:07 +00:00
Russ Cox 8405e23b05 cmd/golangorg: fix testdata/live.txt for golang.org → go.dev redirect
Change-Id: I7c16ab5add6c801d1e71564be56bbab670ab39b0
Reviewed-on: https://go-review.googlesource.com/c/website/+/366175
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-11-22 17:23:25 +00:00
Julie Qiu bfee50665c _content: update security policy in case of no response
The golang.org/security page is updated with instructions for the
reporter in case they do not receive an acknowledgement from the
security team.

Change-Id: I522a3e945e2ea87daa27c75cf7fbaf29c6ff61b2
Reviewed-on: https://go-review.googlesource.com/c/website/+/358538
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>
Website-Publish: DO NOT USE <dmitshur@google.com>
2021-11-22 17:00:48 +00:00
Russ Cox e36abb69b0 _content: unhide various reference links in China
Sites like blog, play, talks, and tour (.golang.org)
were not available in China: we have just the one URL golang.google.cn.
But now:
 - Everything is consolidated to a single site, go.dev.
 - golang.google.cn serves the go.dev content.
 - We've arranged to use relative links for all the content on go.dev
   that points elsewhere on go.dev, so that it all works as golang.google.cn too.

So we can unhide various reference links that were previously hidden
to avoid advertising dead links.

Change-Id: I5e1bf84de61817b0df95049b1f6fc773139d6cf6
Reviewed-on: https://go-review.googlesource.com/c/website/+/365496
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:46:47 +00:00
Russ Cox 61fc64f202 _content: update links to tour
Now the tour is just /tour, not https://tour.golang.org.

Change-Id: Iebb2f7a5218b747896250815f4f46f62755e6a88
Reviewed-on: https://go-review.googlesource.com/c/website/+/365101
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:43:17 +00:00
Russ Cox 9d77df7a83 _content: replace scheme-relative URLs with https://
The time for scheme-relative URLs has passed.

go.dev, like all of .dev, is an HTTPS-only domain.
And golang.org has set HSTS headers for years too.
So these relative links are always going to be https:// on the internet.
When serving from http://localhost, they turn into http://,
which is never what we want.
So rewrite them all to hard-code https://.

Change-Id: I1c25108910a12f2974b8f6ba86d49d0b697516a4
Reviewed-on: https://go-review.googlesource.com/c/website/+/365099
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:43:11 +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 ceabbb96f3 cmd/golangorg: hide $GOROOT/*.md
We do not intend $GOROOT/README.md to be served
as go.dev/README, and so on. Worst of all, on Macs and Windows
(with case-insensitive file systems), SECURITY.md overrides
_content/security.html.

Change-Id: I4ac53508c34a4799aa4afd45db7e7e266e179936
Reviewed-on: https://go-review.googlesource.com/c/website/+/365098
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:43:03 +00:00
Russ Cox 40c0eef097 go.dev: merge go.dev/_content into root _content
Many renames. And then adjust references.

Change-Id: I4d03c76dbc0bf4d070208d568861ee820904c0dc
Reviewed-on: https://go-review.googlesource.com/c/website/+/365097
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-11-22 16:42:59 +00:00
Russ Cox 370a0d0e46 _content: delete golang.org-specific files
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>
2021-11-22 16:42:50 +00:00
Russ Cox ab4f479b5c all: make golang.org and go.dev links relative
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>
2021-11-22 16:42:44 +00:00