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

3518 Коммитов

Автор SHA1 Сообщение Дата
Jamal Carvalho 407039edd4 root: ignore static build files in static
Change-Id: Idc704e04fc2af393735a07dea5b77f0fc0f50a0a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327278
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-12 14:34:29 +00:00
Jamal Carvalho c338e469fb static: update asset URL paths
Fixes the URLs to static assets in non-legacy pages.

Change-Id: I68146cec51b267548f8a135b32c98880a8bd21cd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327277
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>
2021-06-12 14:32:45 +00:00
Jamal Carvalho 1213557bc8 static/legacy: update asset URL paths
Update legacy asset URLs to point to static/legacy instead
of content/static.

Change-Id: Id40ea3c3b105b194462123bbf7c2940d01241fd5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327411
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>
2021-06-12 14:32:36 +00:00
Jamal Carvalho 665d5927f8 static: copy legacy assets into static
Code in motion. To continue to serve the legacy unit page
while the new layout experiment is deactivated, copying the
assets into the new static directory.

Change-Id: I99d450d91403e2ba6d5f0df9a086fe7576e91087
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327410
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>
2021-06-12 14:32:30 +00:00
Jamal Carvalho d083bfe364 root: update ignore settings for legacy assets
Change-Id: I01aa85739efc1c14a839cb6691a767c1eb14c8d7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327409
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>
2021-06-12 14:32:19 +00:00
Julie Qiu 6f80375784 internal/dcensus: add Latency
There are several places where we need to compute the latency
measurement for recording an opencensus measurement.

A dcensus.Latency function is added so that
we can ensure latency is being calculated in the same way for all
measurements.

Change-Id: Ic138f29106f88c9c468084816d8856e47bbd7cc2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/247359
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>
2021-06-12 01:54:21 +00:00
Jamal Carvalho 2717a634e1 package(-lock).json: run npm audit fix
Ran npm audit fix to patch security vulnerabilities.

Change-Id: I00a87bfad6ebf5b445c604c1a3bb3a6064599515
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327296
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>
2021-06-11 21:56:04 +00:00
Jamal Carvalho b37c8ca1d6 static: copying web assets into nested folder structure
Web assets are being reorganized in the pattern
content/<service>(/<domain>)/<file> to make the structure of
the web services and our component based development pattern
easier to understand.

New shared assets will go into content/shared grouped by
component.

Templates used to generate package docs moves to content/doc.

Assets used in the frontend move to content/frontend grouped by
by page.

Assets used in the worker move to content/worker.

In slightly more detail the final result will look like:

static/doc
  body.tmpl
  outline.tmpl
  ...
static/frontend
  /badge
  /homepage
  ...
  /unit
    /versions
    /main
    ...
static/shared
  /breadcrumb
  /button
  /typography
  ...
static/worker
  worker.css
  worker.ts
  ...

Code in motion. The frontend still reads from content/static.

Change-Id: I03dc39bfd3c94ff8d749a2c8e440b201276c40ba
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327295
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-11 21:55:56 +00:00
Jamal Carvalho e85cba1206 package.json: add paths to lint and test commands
Limit testing and linting to content/static directory
temporarily before copying frontend assets into a new
folder structure. This will prevent errors while transitioning
and be undone in a later CL.

Change-Id: I4f1629be42ebbe2813586f321e394b7f862ce3d6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327294
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>
2021-06-11 21:55:49 +00:00
Jamal Carvalho db7ab86109 content/static: remove usage of legacy images
Change-Id: Iafd0605529aa1228874720d3a0134bee5aff9bdf
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327293
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-11 21:55:44 +00:00
Jamal Carvalho d5e2a43dc6 content/static: apply playground XSS fix to playground.ts copy
Applying the fix from CL 326349 to the new playground
module.

Change-Id: I8174d62b44b164a1e1b161ed60d87f61f17ec3c9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327292
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-11 21:55:39 +00:00
Jamal Carvalho c1f140ed7c content/static/_header: fix header links to go.dev pages
Change-Id: I643ac7bddc560a5919315923601dd89e4991643d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327291
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-11 21:55:35 +00:00
Jamal Carvalho 45b240f298 content/static/homepage: use cropped gopher image
The old image file contained excess whitespace.
Switching to the cropped image and adusting styles
fit the new image size.

Change-Id: Idd0a3603192c5bd70c64c605746eb451afb21ae3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327290
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>
2021-06-11 21:55:30 +00:00
Jamal Carvalho 8046f4f172 content/static/_gopher: crop homepage gopher
Cropped the homepage gopher to trim excess whitespace.

Change-Id: I77f6b1bd68bfa5f1053cf319b6a8b313ecbc7f42
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327289
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>
2021-06-11 21:55:25 +00:00
Julie Qiu fced913ebf devtools/ci: run all tests in ci.sh
The internal kokoro build.sh currently runs the following:

devtools/ci/ci.sh
devtools/ci/nodejs.sh npm install --quiet
devtools/ci/nodejs.sh npm run lint
devtools/ci/nodejs.sh npm run test
devtools/ci/e2e.sh

Rather than having multiple files referenced in the internal kokoro
file, moving these tests to ci.sh. That way it is more opaque what we
are running in CI, and easier to add/remove files and comment out lines
for testing.

devtools/ci/nodejs.sh will be deleted in a future CL once it has been
removed from the internal build.sh.

Change-Id: I397a5d5cd2efb59da7a771617330f70b980911b0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326970
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>
2021-06-11 20:39:28 +00:00
Julie Qiu 46d4a94fd5 devtools: copy ci/nodejs.sh to nodejs.sh
A copy of devtools/ci/nodejs.sh is made to devtools/nodejs.sh, and the
latter is now referenced where devtools/ci/nodejs.sh was previously used.

This makes it easier to comment out tests when testing configuration
changes to kokoro.

Also, since the contents of ./devtools/nodejs.sh are used in non-ci
parts of the repo, so it makes sense to have that script outside the ci/
folder.

In a future CL, rather than having these 3 lines in the kokoro config:

devtools/ci/nodejs.sh npm install --quiet
devtools/ci/nodejs.sh npm run lint
devtools/ci/nodejs.sh npm run test

They will be moved to devtools/ci/nodejs.sh, which will use
devtools/nodejs.sh.

Change-Id: I156324a625666ead31be18ae19e5608d38e0faf1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326989
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-11 20:13:42 +00:00
Julie Qiu 0c78565f52 e2e/docker: add Dockerfile.frontend
The contents of this file was empty when added in CL 326649.

Change-Id: I0ee29544e6b0747befc10553a2800e15608861cc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326969
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-11 20:12:58 +00:00
Jonathan Amsterdam 1c1eedc50b internal/queue: fix race condition
InMemory.WaitForTesting was waiting for the set of workers to be
empty, but that's not quite the same as the queue being empty: all the
workers can finish momentarily before a new one starts up.

Wait for the queue itself to be empty.

Change-Id: Icf0e970fdb2f45aa30c358c9d4af1083442a0293
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327109
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>
2021-06-11 18:04:46 +00:00
Julie Qiu a973529477 package-lock.json: update
Ran all.bash.

Change-Id: I5318bff28645c65254d3f663d3f847c91ee584f1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326775
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>
2021-06-11 16:53:07 +00:00
Julie Qiu 429687bc17 internal/source: fix TestModuleInfo
Change-Id: I4024fc8a4a3f44a62b13e05190b96ac7225dbaa5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326776
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Julie Qiu <julie@golang.org>
2021-06-11 16:52:54 +00:00
Jamal Carvalho 968251b07b e2e: update snapshots
Update snapshots to include minor layout shifts
caused by the new base stylesheet.

Change-Id: I12aff0e4ea9e4f9fdd507db56dec37bfb209fc4b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326814
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>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-11 15:17:17 +00:00
Jamal Carvalho 95a3537843 content/static: add test id to header
Adding a test id for pagecheck tests.

Change-Id: If1a5665b4210c08399417abb52edfbd35810a8fe
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326815
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-11 15:17:03 +00:00
Julie Qiu 41d54d398b internal/frontend: change license policy title
basepage.HTMLTitle is changed from "Licenses" to "License Policy" for
consistency with the templates.

In a future CL, basePage.HTMLTitle should be removed.

Change-Id: If20e8e42518ca2ef957023c91905dee626ed7d96
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326770
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-10 21:48:53 +00:00
Julie Qiu 8b2458ca6b devtools/e2e: add setup for running e2e in CI
A setup is added using docker-compose, which allows us to run e2e tests
locally and in CI.

As of this CL, e2e/basic.test.ts can be run locally using
`./e2e/docker/run.sh e2e/basic.test.ts`.

Change-Id: Ief17c51ed7ab7de9cc8c535a7061f18d75763ecd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326649
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>
2021-06-10 19:41:52 +00:00
Jamal Carvalho 698c260f37 content,internal: add description and title to unit page
Adds title and description to the legacy and new layout
unit pages. MetaDescription is updated to be the synopsis
of the documentation page.

Change-Id: Ie214229fa61075b75bb69d0eadb8060906da2519
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326812
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-10 19:32:35 +00:00
Jamal Carvalho 6d14113c91 content/static/fetch: update fetch page description
The fetch page mistakenly contained the description for
the badge page.

Change-Id: Ie43e8ddf4676adeea8874363da4a9b523f4f6c63
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326811
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-10 19:31:48 +00:00
Jamal Carvalho de8692c720 content/static: use color intents on homepage content
Switching color usage to color intents as a prerequisite
for dark mode.

Change-Id: Id958ba13cecfd7c07d88e4b331750bf270007bcc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326810
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-10 19:30:41 +00:00
Jamal Carvalho b208126254 content/static: fix typo in favicon url
Change-Id: I2f91996293e72a167d99822a4b8e024d3c85c6e1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326809
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-10 19:30:31 +00:00
Julie Qiu 58977587c1 content/static/search: fix title
The title for the search page should be "<query> - Search Results", not
"Search Help · pkg.go.dev" which was previously overriding the former
title.

Change-Id: Ieb38c5dd8fd771e6cd0a71edf5a2e801cc74429c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326769
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
2021-06-10 19:10:12 +00:00
Julie Qiu e04fa6a0ba internal/source: change golang.org/* repos
Rather than using github.com/golang/* for the golang.org/* repos, use
cs.googlesource.com/go when available.

Change-Id: I88acf4c1316b160b0852ef954a515276e92ad975
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326190
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>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2021-06-10 17:00:44 +00:00
Jamal Carvalho 861c790c1c tsconfig,content/static: enable strict typechecking on all TS files
Only .ts files in content/static/js were checked in CI for
type safety. Changing the tsconfig file to check all .ts
files in content/static and fixing existing type warnings.

Change-Id: I7187156124fed4aaf138d8afe3aa02891b4c7e4a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326710
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>
2021-06-10 16:26:04 +00:00
Jamal Carvalho abc2686366 third_party: add type definition for dialog polyfill
Change-Id: I89c586cc3b0d115357f758d32f885d08ac64bf35
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326709
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Jamal Carvalho <jamal@golang.org>
2021-06-10 16:24:55 +00:00
Jonathan Amsterdam 90787419fb internal/frontend: add read-imports experiment to server tests
Change-Id: I4b94f9ab48c73a886ec9c00d8edc4e316709786c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326669
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>
2021-06-10 13:37:38 +00:00
Jonathan Amsterdam 47acd59312 internal/source: replace bitbucket and gitea tests
Replace two of the three deleted tests.

The third deleted test was for git.pirl.io. That site is currently
unreachable and we haven't seen a module from it since March, so I'm
assuming it's offline.

Fixes golang/go#46676

Change-Id: Ib0fcc8f58eeda938dbdf90199185c1424e34613a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326670
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>
2021-06-10 13:34:08 +00:00
Jonathan Amsterdam fa03708786 internal/postgres: read from imports table
Read from the imports table instead of package_imports, under an
experiment.

Change-Id: Id5b61285325f28a168faeb25651839663269feaf
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326450
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>
2021-06-10 11:02:10 +00:00
Jonathan Amsterdam bcf7e4ea58 internal/database: fix flaky test (again)
The TransactSerializable test flaked about one time in fifty.
Retry it to deflake.

Now it doesn't fail even with -count 1000 on my machine.

Change-Id: I61e1f115dfe479d12f848dc4596572804cbbc19c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326451
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-10 10:59:22 +00:00
Jonathan Amsterdam d1a6ef5b25 internal/postgres: write to imports table
Write a package's import paths to the new imports table
as well as the existing package_imports table.

Change-Id: Ie0afe5aa90e79e8371a51cc6fc5f68de3dc62cd8
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326449
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>
2021-06-10 10:49:42 +00:00
Julie Qiu df4f05dc59 internal/source: delete broken URLs in TestModuleInfo
These tests fail when running TestModuleInfo with -record and are
deleted.

--- FAIL: TestModuleInfo (76.97s)
    source_test.go:435: Recording into testdata/TestModuleInfo.replay
    --- FAIL: TestModuleInfo/vanity_for_bitbucket (1.10s)
        source_test.go:407: https://bitbucket.org/ivucica/go-glagolitic: 401 Unauthorized
    --- FAIL: TestModuleInfo/gitea (1.30s)
        source_test.go:407: https://gitea.com/azhai/xorm: 404 Not Found

Change-Id: I2ec516bb85d55a81c40ee5e38ef9aec1396a457a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326229
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>
2021-06-10 01:19:22 +00:00
Jamal Carvalho c59ead4a15 content/static: update unit page icons
Change-Id: I0d01880fcf45267418e8d13a713d13e16b105496
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326355
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>
2021-06-09 23:44:39 +00:00
Jamal Carvalho 961b575124 content/static: adjust spacing around nav tree
Adjusting the padding around the outline
ensures that the keyboard focus indicator
is visible when items in the nav are tabbed
into.

Change-Id: Ie796dcba0bb0169eedc8089051a1bd449c5362db
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326354
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>
2021-06-09 23:44:13 +00:00
Jamal Carvalho 9f41072a74 content/static: adjust line height for body and code samples
Increasing line heights to improve legibility on
the documentation pages.

Change-Id: I52c29a8d03c8f36aa6a82fc61a88e79760155059
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326352
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-09 23:43:58 +00:00
Jamal Carvalho b0c2582f66 content/static: remove excess header margin
The imports page already has sufficient space between
the header and the title. Removing the excess margin
to match the rest of the unit pages.

Change-Id: Iffd37c4ea08d88197b47d73a8345ed7a0c4353e4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326353
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-09 23:43:40 +00:00
Jamal Carvalho e5f2fc2baf content/static: adjust dark theme accented icon filter
The accented icon filter is adjusted to match the
color of links.

Change-Id: I980c7a423c4107d4fe9ff541c50a55f27344203e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326351
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-09 23:43:19 +00:00
Jamal Carvalho 2b78682374 internal/frontend: preserve all heading text content in README outline
Now that we remove titles of the readme with changes from
CL 309393 the special case we selectively rendered text
content in headings, in which a heading contains a badge,
is unlikely to occur.

README headings my contain code blocks, images with alt
text, or other content. Removing the selective rendering
of header content will lead to a more consistent and predictable
README outline.

Fixes golang/go#46550

Change-Id: Ia6f41b6fa776694f4a9d6b032e24763d1e6b4613
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326350
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-09 23:42:28 +00:00
Jamal Carvalho 1978df3be3 all.bash: default to docker nodejs image for npm commands
Runs npm and npx commands by default using the
docker helper script instead of the local install.
This will keep everyone synced on the nodejs version
and CI current with our local setup.

You can override this by setting GO_DISCOVERY_NPM_CMD=npm
and GO_DISCOVERY_NPX_CMD=npx to use your locally installed
binaries.

Change-Id: I08841e372d995229eb9ceba328c4a17e2f4c420c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326549
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Jamal Carvalho <jamal@golang.org>
2021-06-09 23:40:44 +00:00
Jamal Carvalho a42126e805 devtools/ci: update docker node run options
Pinning the nodejs image to the long term support
version and adding pseudo-tty to fix warning in CI.

Change-Id: Idd283029b0667a673b7f8f4844c7e92a605edb3b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326550
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>
2021-06-09 23:40:07 +00:00
Jonathan Amsterdam 3f6ba65acd internal/worker: add metric for new unprocessed modules
We have a metric for total unprocessed modules, including new ones and
those we are reprocessing.

Add a metric that tracks only the new ones: those with status 0 or 500
(the latter to count the number of failed new modules).

This metric is a better choice for an alert, since during reprocessing
we expect a very large total backlog, but we never want a large
backlog of new modules.

Change-Id: Ibc3cbee1d867f6a454748237352a70cf9eb500c0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326290
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>
2021-06-09 17:56:31 +00:00
Julie Qiu 6606008756 cmd/internal/seeddb: add script to seed db
A script is added which can be used to seed a database with modules.

Change-Id: I322cb6a5919f04cc9c75fca0ea2e23a91c01639e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/325749
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>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-06-09 17:51:45 +00:00
Jamal Carvalho 17ece77402 content/static: delete unused doc templates
Templates for the doc have moved to content/static/dochtml.

Change-Id: Ia61a4eddc6c1abcc3e557809194979006a86ffed
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326058
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>
2021-06-09 15:35:00 +00:00
Jamal Carvalho e4258e0a01 internal: update references to dochtml
Change-Id: I853d07d59330cd9d86361167449862f3a4d4a7de
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326057
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-06-09 15:34:54 +00:00