Getting started
Steps
To get started with doc2go, we need to first install it.
If you have Go installed, run the following command to install doc2go from source:
go install go.abhg.dev/doc2go@latest
If you don’t have Go installed, or you prefer an alternative installation method, see Installation and come back here after installing.
Open up a local Go project in your terminal.
If you don’t have one handy, run the following command to check out doc2go itself:
git clone https://github.com/abhinav/doc2go cd doc2go
Inside the project directory, run the following command to generate its API reference.
doc2go -out www ./...
This will generate a directory named “www”.
Start a temporary HTTP file server inside the new directory:
cd www && python -m http.server 8000
Open up http://127.0.0.1:8000/ in your browser. You should be able to browse the documentation for the project.
Next steps
The above generates a standalone website with doc2go. The result is ready to use, customize, or deploy.
Next, try the following:
- Publish the standalone website to GitHub Pages
- Explore usage further and customize doc2go’s output
- Embed the documentation into a larger website powered by a static site generator like Jekyll or Hugo