Getting started

Start using doc2go from zero.

Steps

  1. 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.

  2. 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
    
  3. Inside the project directory, run the following command to generate its API reference.

    doc2go -out www ./...
    

    This will generate a directory named “www”.

  4. Start a temporary HTTP file server inside the new directory:

    cd www && python -m http.server 8000
    
  5. 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:

Last modified February 26, 2024: Upgrade to latest Hugo (#214) (0f851c2)