Upgrade github.com/jackc/pgx/v4 to an as-yet-unreleased version that
includes a relevant bug fix (https://github.com/jackc/pgx/pull/975).
Change-Id: I946a94c9a145e2f94efeb0b98fea9ab7f939fb25
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/305449
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Package pages are missing the paragraph symbol / anchor
for some items.
Add this symbol / anchor to allow linking to the tags
that have the "section-sourcefiles", "section-directories",
"section-readme", "section-documentation" ids.
Fixesgolang/go#45210
Change-Id: I37538bcb30dbaa1cca335119775ff56b54c084fb
GitHub-Last-Rev: e058e6f11d
GitHub-Pull-Request: golang/pkgsite#24
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304649
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Julie Qiu <julie@golang.org>
The error messages from UpsertModuleVersionState included a large data structure.
Just include the module path and version.
Change-Id: I1e68f387c7cf2f3aacf959b443e738e6852fb02d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304929
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The symbol_history table is no longer being used and is dropped.
Change-Id: Ib7b399869b7e46d37a727a3cea1c631ca218ab1f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304750
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
ScheduleFetch checks that it is not given "unknownModulePath".
Change-Id: Ie2ae0bde75ad10103b9ea8fb526aa7f09c285733
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304889
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The documentation rows for a given module no longer need to be deleted.
Instead, we are planning to recreate the documentation table by
inserting into new_documentation.
Change-Id: Ia32957fb7947e793d8f8972091d16995d70db04a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304749
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Add the CopyUpsert method, which uses an efficient
Postgres protocol to insert rows.
For this to work, we need the connection underlying a sql.Tx value.
Since sql.Tx doesn't expose its connection, we create one explicitly
in DB.transact.
Change-Id: Ie48ce7a4318f4531d4756f779943188a6f0fb6cd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304631
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The datbase/sql package provides a way to get at the underlying driver's
connection. We will need that feature to access pgx's fast CopyFrom
method.
Unfortunately, we do not use the pgx driver directly. Instead, we wrap
it in an OpenCensus driver for tracing and metrics. And that
OpenCensus driver's connection does not allow us to dig into _it_ to
retrieve the pgx connection that it wraps.
Hence this dance: we must write our own driver and connection
implementations. The driver return the connection, and the connection
holds both the underlying (pgx) connection and the OpenCensus
connection, to which it delegates.
This CL is a no-op; everything behaves as before. But it lays the
groundwork for a subsequent CL that will use pgx's CopyFrom.
Change-Id: I5bf308aa23f07f20d1f6410ebb04cd6b9a5e0922
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304630
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Drop the table only if it exists.
Change-Id: Id2d772fade7ab2624c6a155d0985f09284c734e4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304629
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Adds e2e tests for additonal routes on pkgsite.
Tests are all made suitable to be run against the
staging environment.
Change-Id: Ia549e487490eb0bd47049ba306143db45905726a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304590
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Each e2e test file was starting and closing its
own instance of Chrome. To speed up the tests
we are now sharing a single instance of across
test files and properly exiting after the tests
have completed.
Change-Id: Ia7ad4acaf961cf89a177e293e971c94b43b76d05
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304589
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Fixes pagecheck for the recently rolled out
sticky header and enables the sticky header
experiment in the server tests.
Change-Id: I140bc22ed2c37304883d177228b59bda5c65441f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304511
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Adds a feature to scroll the page to the top when any
whitespace on the header is double clicked. Useful as
an alternative to the home key for quickly going back
to the top of the page.
Change-Id: Ibd59e4aeb18850f672dd1628b18b2071c8c3cbf2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304270
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Fixes breakpoints for the detail items
in the transition from full height to sticky
for mobile size viewports.
Change-Id: I90ec4bea0403a6efc79957bb7429d103c1386093
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304269
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
On the imported-by tab, incorporate both the number of importers we
actually display and the number we get for search into a single
phrase.
Change-Id: Ia9b84cbc20d01dfd253455e2d391fe4c9d0cd0d3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303789
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Check that the module path is not internal.UnknownModulePath.
Change-Id: I3a204f27a1d82becec8fbdb95290ccc00b308ccb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304389
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The type for frontend.Symbol has changed since tests passed for
CL 300173, which caused build errors that are fixed.
Change-Id: I71264a14dddaf9ef7a417091db9455bd9b9455ee
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304089
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
A script is added which tests the output of the stdlib versions page
with data from the api/goN.txt files.
For golang/go#37102
Change-Id: Ie3e5388f502e2d11fc0388ee64f27493978d97a6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/300173
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
GitHub will translate a .../blob/... URL in a README to the
corresponding .../raw/... URL. We need to do the same.
Fixesgolang/go#45168
Change-Id: Ib5b9a2c33d2b3da324f16f55790ee7b228f39d7f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303790
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
When a request is made to a path that we haven't seen before, we should
always return a 404 with the option to fetch that path. A bug is fixed
which previously redirected unknown versions of a path to the most
recent version.
Fixesgolang/go#45107
Change-Id: Ic5180d2e40790eadbc07434cc0ffe25179b35194
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303771
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
When the frontend server is run in dev mode it
builds the JavaScript out files unminified which can
leave behind unstaged files with unwanted changes.
Currently, all.bash checks that the minified
JavaScript files match the output from compiling
the TypeScript files. This change updates the script
to write the files on run to clean up the content/js
folder after running the frontend in dev mode.
Change-Id: I6bed05613bae97430fc6c8a47a611eb673d1fb43
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303770
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Heading nodes that contained only non-text content
would show as whitespace in the outline. This change
updates the outline generation logic to use text
extracted from non-text nodes when a heading contains
no plaintext.
A first pass through nodes in a heading looks for text
and writes found text to a buffer. If the buffer is
empty after the second pass, other nodes are used to
generate the heading label text.
Text breaking needed for documentation causes issues with
text in tables in the readme. Moved the word break styles
to the UnitDoc class.
For golang/go#45164
Change-Id: I0fa005d43c605f972d669966c80369c4fdaea85d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303749
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
The experiment was removed from the codebase, but checks in the
templates were not.
Change-Id: I993b96f77fba0cd4dbda97390c7bff9f8adac649
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303709
Trust: Julie Qiu <julie@golang.org>
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
There are several unused columns on the documentation table which are
now dropped.
The documentation table will be replaced by the new_documentation table
after reprocessing, but for now dropping the trigger on id and id_bigint
should make inserts/updates faster for reprocessing.
Change-Id: I137b7fc7a3d6a9c576a0d65da1581ac5efb7f34f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303450
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Indexes are added to new_documentation and documentation_symbols for
columns that are frequently accessed with a WHERE clause.
Change-Id: I8be193b039d8d519492e284b0b7dd29a2fb5532a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303449
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
After processing a module, call ReInsertLatestVersion.
Skip the call if this is the cooked latest version of an alternative
path. The same check is made inside ReInsertLatestVersion, but using
the module_version_states table, and the module being processed has
not yet been inserted into that table.
For golang/go#44710
Change-Id: Icd0d0c0045ccadf3e97d32c63146262a3b442577
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303649
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
The ReInsertLatestVersion method now changes imports_unique as well as
search_documents.
For golang/go#44710
Change-Id: Ie5dcfe8e362313be76f0ad4958882e37fc725e44
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303313
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
The source for these import paths is served by the git-arr web
viewer, which doesn't yet handle tags. Until it does, serve
the source from master.
For golang/go#44607
Change-Id: I94047a887ea6f1038ae812864ad343876b74ff8e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303609
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
New latest-version info can retract the current latest good version,
resulting in an older version becoming the new latest good version.
Add a function that updates the search_documents table when
that happens.
A later CL will also update imports_unique, and will call this
function from the worker.
For golang/go#44710
Change-Id: I09569e27d384ed7defb06a4e81facdb96c22caeb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303312
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Maintaining two separate header components is cumbersome and
the fixed header requires accessibility hacks to remove it
from the accessibility tree. We can use the sticky position
css attribute with some simple transitions to achieve the
same effect. This change will simplify header maintenance
and create a more unified experience for mouse and keyboard users.
Fixesgolang/go#45132Fixesgolang/go#44909Fixesgolang/go#42817
Change-Id: Icbfa4efc3de09c534b7823c57e2e481711eac31b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303412
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Data is now inserted into the new_documentation table, which will
replace the documentation table once reprocessing is done. The
documentation_id rows for documentation_symbols now reference
new_documentation.
Tests for symbols which were deleted in CL 303116 are added back.
TestFrontendMainPage/main_page_hello_-_multi_GOOS_JS_page is flaky and
will be added back in a future CL.
Change-Id: I8d7aed2092b3d19c45c14be5f9a0986dfe224aeb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303115
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TABLE new_documentation is created, which will replace the documentation
table after reprocessing. new_documentation has the following schema changes:
- id is a BIGINT instead of INTEGER
- goos and goarch are ENUMs
- zip column is dropped, since it is not being used
documentation_symbols is updated with a FK to new_documentation. The
id column is dropped, and id_bigint is renamed to id.
The id column on package_symbols is also dropped and id_bigint is
renamed to id.
Change-Id: I916ed7edd38647cd75f95f05f1fc7ea5b5c8980d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303113
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Previously, UpdateLatestModuleVersions only changed the raw and cooked
versions, leaving the good version to InsertModule. Now it updates the
good version when the current good version is retracted, which
otherwise would not happen.
For golang/go#44710
Change-Id: I90d771310dbfb56ae02255e0abc3afddcce7b34c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303311
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Copies unit header html and styles into
legacy files in anticipation of updates
to the header.
Change-Id: I5921537da5f1e94a9c3bc30a2b279a9e6b5bf975
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303411
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Reusing the same page between tests cases
can lead to unexpected results when things
like scroll position are not reset. Removing
the global in favor of local page objects
that can be shared when convenient or reset
between tests.
Change-Id: I9e5b851d58a393fb3553ff281b8addbcb7044f81
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303114
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
When inserting a module, we skip inserting into search_documents if
the module path is an alternative one.
This CL factors out that test, and also reimplements it in terms of
the latest cooked version. Previously, any later version with a 491
status would classify the path as alternative, but this version uses
the latest cooked (non-retracted) version's status to decide, allowing
module authors to fix mistakes.
Change-Id: I3588f3df6a1a4dd4db59333314c34167eda51df1
For golang/go#44710
Change-Id: I670d9085800fed198e6dd6469f1a8d5728c5f039
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303309
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Tests for symbols are temporarily deleted so that tests pass when we
change around primary keys.
Change-Id: I3afaf84ad76bbc75bfe37ef7c16b4dc60e3abbc1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303116
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Define a function to get the major version from a module path in a
clean way, and use it.
For golang/go#45098
Change-Id: I0a5053a763cf93dbd076ca4e0adc68d9c1bfb7f0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/302951
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
The number shown in the imported-by tab should match the number of
packages actually displayed.
That might contradict the search result number, but at least it is
consistent with what is on the same page.
For golang/go#44965
Change-Id: I8f2e3caff4a440038f41d9bf8b3710ecd21d42d9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/302949
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
The hex value for var(--blue) is updated based on the new UXD style
guide. This color is currently only used for highlighting anchor tags.
UnitDirectories-moduleTag is deleted since this class is not used
anywhere.
Change-Id: I70e4544f9b3d1be44c231678e63357a6ff8a2825
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/302672
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
The Versions-minor class is currently unused and is removed.
The class will be added back in a future CL when this element is styled.
Change-Id: I2b51b2dc36386cbdec6a6e219ba2976e3ad9ef09
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303109
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
When finding the latest major version of a unit, do not
consider untagged (that is, pseudo) versions.
For golang/go#45098
Change-Id: Ic38480f68edbe2a3db189bc3055ae75b3d5df72b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/302950
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The rate of growth for the documentation table suggests that the id
column might hit the INTEGER limit as the size of our database grows. We
change this to a BIGINT column now, since its easier to make this change
before this table is used in prod.
The update_documentation_id is changed to update both documentation.id
and documentation.id_bigint with the same value on INSERT or UPDATE.
Change-Id: Id310ed548c2fa3769fbd2707cea4f69295434f2f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/302671
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>