make: Add serve-gh-pages target
As github pages is served not on root but /go-org/ we need to move everything into a subdirectory of that name when serving locally
This commit is contained in:
parent
67951ec664
commit
f8b8e73722
2 changed files with 7 additions and 3 deletions
5
Makefile
5
Makefile
|
@ -33,6 +33,11 @@ generate-gh-pages: build
|
|||
generate-fixtures: build
|
||||
./etc/generate-fixtures
|
||||
|
||||
.PHONY: serve-gh-pages
|
||||
serve-gh-pages: generate-gh-pages
|
||||
cd docs && mkdir go-org && mv * go-org 2> /dev/null || true
|
||||
cd docs && python3 -m http.server
|
||||
|
||||
.PHONY: fuzz
|
||||
fuzz: build
|
||||
@echo also see "http://lcamtuf.coredump.cx/afl/README.txt"
|
||||
|
|
|
@ -124,7 +124,8 @@ convert="<html>
|
|||
</body>
|
||||
</html>"
|
||||
|
||||
mkdir -p docs
|
||||
rm -rf docs
|
||||
mkdir docs
|
||||
go get github.com/chaseadamsio/goorgeous
|
||||
cp etc/_goorgeous.go docs/goorgeous.go
|
||||
go build -o docs/goorgeous docs/goorgeous.go
|
||||
|
@ -147,14 +148,12 @@ for org_file in $org_files; do
|
|||
</div>"
|
||||
done
|
||||
go_org_vs_goorgeous_examples+="</body></html>"
|
||||
rm docs/goorgeous docs/goorgeous.go
|
||||
|
||||
echo "$index" > docs/index.html
|
||||
echo "$convert" > docs/convert.html
|
||||
echo "$go_org_vs_goorgeous_examples" > docs/go-org-vs-goorgeous.html
|
||||
cp etc/_wasm.go docs/wasm.go
|
||||
GOOS=js GOARCH=wasm go build -o docs/main.wasm docs/wasm.go
|
||||
rm docs/wasm.go
|
||||
cp $(go env GOROOT)/misc/wasm/wasm_exec.js docs/wasm_exec.js
|
||||
|
||||
mkdir -p docs/blorg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue