• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..09-Jul-2019-

analysis/H09-Jul-2019-1,7341,174

golangorgenv/H09-Jul-2019-4327

redirect/H09-Jul-2019-1,6721,503

static/H03-May-2022-1,2781,083

util/H09-Jul-2019-180100

vfs/H09-Jul-2019-1,7541,244

README.mdH A D09-Jul-20191.1 KiB3221

corpus.goH A D09-Jul-20195 KiB16975

dirtrees.goH A D09-Jul-201910.1 KiB384280

dirtrees_test.goH A D09-Jul-20191.5 KiB6548

format.goH A D09-Jul-201910.5 KiB372227

godoc.goH A D09-Jul-201925.8 KiB942681

godoc17_test.goH A D09-Jul-2019956 3620

godoc_test.goH A D09-Jul-20199.5 KiB371315

index.goH A D09-Jul-201942.2 KiB1,5811,135

index_test.goH A D09-Jul-20197.4 KiB324287

linkify.goH A D09-Jul-20195.8 KiB196132

meta.goH A D09-Jul-20193.5 KiB145106

page.goH A D09-Jul-20192 KiB8367

parser.goH A D09-Jul-20192 KiB7547

pres.goH A D09-Jul-20194.7 KiB16399

search.goH A D09-Jul-20195.3 KiB187131

server.goH A D09-Jul-201924.1 KiB838619

server_test.goH A D09-Jul-20191.9 KiB7049

snippet.goH A D09-Jul-20193.2 KiB12488

spec.goH A D09-Jul-20193.5 KiB180136

spec_test.goH A D09-Jul-2019475 2315

spot.goH A D09-Jul-20191.9 KiB8447

tab.goH A D09-Jul-20191.6 KiB8368

template.goH A D09-Jul-20195.5 KiB180119

versions.goH A D09-Jul-20196.2 KiB225172

versions_test.goH A D09-Jul-20193.1 KiB133114

README.md

1# godoc
2
3This directory contains most of the code for running a godoc server. The
4executable lives at golang.org/x/tools/cmd/godoc.
5
6## Development mode
7
8In production, CSS/JS/template assets need to be compiled into the godoc
9binary. It can be tedious to recompile assets every time, but you can pass a
10flag to load CSS/JS/templates from disk every time a page loads:
11
12```
13godoc -templates=$GOPATH/src/golang.org/x/tools/godoc/static -http=:6060
14```
15
16## Recompiling static assets
17
18The files that live at `static/style.css`, `static/jquery.js` and so on are not
19present in the final binary. They are placed into `static/static.go` by running
20`go generate`. So to compile a change and test it in your browser:
21
221) Make changes to e.g. `static/style.css`.
23
242) Run `go generate golang.org/x/tools/godoc/static` so `static/static.go` picks
25up the change.
26
273) Run `go install golang.org/x/tools/cmd/godoc` so the compiled `godoc` binary
28picks up the change.
29
304) Run `godoc -http=:6060` and view your changes in the browser. You may need
31to disable your browser's cache to avoid reloading a stale file.
32