Generate static documentation for Go packages

Repository: https://gitlab.com/tslocum/godoc-static

Demo output: https://docs.rocketnine.space

Inspired by the recent news of godoc,org shutting down I have created godoc-static. While we could all migrate to pkg.go.dev, we could also host and update our documentation ourselves.

When invoked, “godoc -http=localhost:####” is started, relevant package documentation pages and source code is scraped and rewritten to fix styling, expanding content, etc., then godoc is terminated.

Note that while things seem to work, I have only focused on shipping the MVP so far. Here be dragons. For instance, to get this to work on my VPS I had to set GO111MODULE to off and clone relevant package sources to GOPATH.

1 Like

I’ve spent some more time polishing this, it should be ready for use. I would appreciate any feedback on this project.

Documentation is now also written to docs.zip to allow offline access later for users without godoc.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.