README
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.
Directories
Path | Synopsis |
---|---|
cmd/admingolangorg | The admingolangorg command serves an administrative interface for owners of the golang-org Google Cloud project. |
cmd/golangorg | Godoc extracts and generates documentation for Go programs. |
cmd/googlegolangorg | A trivial redirector for google.golang.org. |
content/static | Package static exports a map of static file content that supports the godoc user interface. |
content/static/internal/gen | Package gen is used by content/static/makestatic.go to generate content/static/static.go. |
internal/dl | Package dl implements a simple downloads frontend server. |
internal/env | Package env provides environment information for the golangorg server running on golang.org. |
internal/history | Package history stores historical data for the Go project. |
internal/markdown | Package markdown provides a wrapper for rendering Markdown. |
internal/memcache | Package memcache provides a minimally compatible interface for google.golang.org/appengine/memcache and stores the data in Redis (e.g., via Cloud Memorystore). |
internal/proxy | Package proxy proxies requests to the playground's compile and share handlers. |
internal/redirect | Package redirect provides hooks to register HTTP handlers that redirect old godoc paths to their new equivalents and assist in accessing the issue tracker, wiki, code review system, etc. |
internal/short | Package short implements a simple URL shortener, serving shortened urls from /s/key. |