content/static: fix collapsed spacing in preformatted blocks

We have "word-spacing: -0.3em" for <code> in our CSS, but that causes
Markdown code blocks to have misaligned spacing. Markdown renders
blocks in <pre><code>, so this change updates the CSS to override the
word spacing back to zero for code blocks. (We use the goldmark
package, but other Markdown renderers produces <pre><code> too.)

Fixes golang/go#41507

Change-Id: Ic5262dfe006d1206843575975885deb1c14e5c75
Reviewed-on: https://go-review.googlesource.com/c/website/+/271277
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
2 files changed
tree: 500456fdb43711faf2bad5ea49184a9b5bf83c85
  1. .prettierrc
  2. AUTHORS
  3. CONTRIBUTING.md
  4. CONTRIBUTORS
  5. LICENSE
  6. PATENTS
  7. README.md
  8. cmd/
  9. codereview.cfg
  10. content/
  11. favicon.ico
  12. go.mod
  13. go.sum
  14. internal/
  15. robots.txt
README.md

Go website

This repository holds the Go website server code and content.

Checkout and Run

To download and run the golang.org web server locally:

  • git clone https://go.googlesource.com/website
  • cd website
  • go run ./cmd/golangorg
  • Open http://localhost:6060/ in your browser.

See cmd/golangorg/README.md for more details.

Changing Content

To make basic changes to the golang.org website content:

  • Make the changes you want in the content/static directory.
  • Stop any running go run ./cmd/golangorg.
  • go generate ./content/static
  • go run ./cmd/golangorg
  • Open http://localhost:6060/ in your browser.

See content/README.md for more sophisticated instructions.

JS/CSS Formatting

This repository uses prettier to format JS and CSS files.

The version of prettier used is 1.18.2.

It is encouraged that all JS and CSS code be run through this before submitting a change. However, it is not a strict requirement enforced by CI.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the website repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/website:” in the subject line, so it is easy to find.