Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

64 lines (40 sloc) 1.396 kb

Go by Example

Content and toolchain for Go by Example.


The Go by Example site is built by extracting code & comments from source files in examples and rendering that data via the site templates. The programs implementing this build process are in tools.

The build process produces a directory of static files suitable for serving by any modern HTTP server. The Go by Example site is served by a lightweight Go server.


To build the site:

$ tools/build
$ open site/index.html

To build continuously in a loop:

$ tools/build-loop

Builds require the pygmentize binary for syntax highlighting. We suggesting using the most recent version from Bitbucket with e.g.:

$ export PATH="$HOME/repos/pygments:$PATH"


The site is served by the gobyexample-server tool. To export to this tool:

$ SITEDIR=../gobyexample-server/public tool/build


This work is licensed under a Creative Commons Attribution 3.0 Unported License.


Thanks to Jeremy Ashkenas for Docco, which inspired this project.

Jump to Line
Something went wrong with that request. Please try again.