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

..17-Oct-2020-

analysis/H17-Oct-2020-1,7341,174

golangorgenv/H17-Oct-2020-4327

redirect/H17-Oct-2020-1,6721,503

static/H03-May-2022-1,2861,096

util/H17-Oct-2020-180100

vfs/H17-Oct-2020-1,8321,319

README.mdH A D17-Oct-20201.1 KiB3221

corpus.goH A D17-Oct-20204.9 KiB16673

dirtrees.goH A D17-Oct-202010 KiB384280

dirtrees_test.goH A D17-Oct-20201.5 KiB6548

format.goH A D17-Oct-202010.5 KiB372227

godoc.goH A D17-Oct-202025.7 KiB940679

godoc17_test.goH A D17-Oct-2020956 3620

godoc_test.goH A D17-Oct-20209.5 KiB371315

index.goH A D17-Oct-202042.2 KiB1,5811,135

index_test.goH A D17-Oct-20207.4 KiB324287

linkify.goH A D17-Oct-20205.8 KiB196132

meta.goH A D17-Oct-20203.7 KiB151111

page.goH A D17-Oct-20202 KiB8367

parser.goH A D17-Oct-20202 KiB7547

pres.goH A D17-Oct-20204.8 KiB165101

search.goH A D17-Oct-20205.3 KiB187131

server.goH A D17-Oct-202024.1 KiB838619

server_test.goH A D17-Oct-20203 KiB11386

snippet.goH A D17-Oct-20203.2 KiB12488

spec.goH A D17-Oct-20203.5 KiB180136

spec_test.goH A D17-Oct-2020475 2315

spot.goH A D17-Oct-20201.9 KiB8447

tab.goH A D17-Oct-20201.6 KiB8368

template.goH A D17-Oct-20205.5 KiB180119

versions.goH A D17-Oct-20206.2 KiB225172

versions_test.goH A D17-Oct-20203.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