# great-docs preview


Preview your documentation locally.


``` bash
great-docs preview [OPTIONS]
```


Starts a local HTTP server and opens the built documentation site in your default browser. If the site hasn't been built yet, it will build it first.

The site is served from `great-docs/_site/`. Use `great-docs build` to rebuild if you've made changes.

Use `--site-dir` to preview a site from any directory (e.g. output from a `--from-repo` build).


<span class="gd-details-chevron" aria-hidden="true"></span>Full --help output


    Usage: great-docs preview [OPTIONS]

      Preview your documentation locally.

      Starts a local HTTP server and opens the built documentation site in your
      default browser. If the site hasn't been built yet, it will build it first.

      The site is served from 'great-docs/_site/'. Use 'great-docs build' to
      rebuild if you've made changes.

      Use '--site-dir' to preview a site from any directory (e.g. output from a '
      --from-repo' build).

      Examples:
        great-docs preview                    # Preview on port 3000
        great-docs preview --port 8080        # Preview on port 8080
        great-docs preview --site-dir /tmp/weathervault-site

    Options:
      --project-path DIRECTORY  Path to your project root directory (default:
                                current directory)
      --port INTEGER            Port for the local preview server  [default: 3000]
      --site-dir DIRECTORY      Path to a pre-built site directory to serve
                                (bypasses project detection)
      --help                    Show this message and exit.


# Options


`--project-path: DIRECTORY`  
Path to your project root directory (default: current directory)

`--port: INTEGER = 3000`  
Port for the local preview server

`--site-dir: DIRECTORY`  
Path to a pre-built site directory to serve (bypasses project detection)


# Examples

``` bash
  great-docs preview                    # Preview on port 3000
  great-docs preview --port 8080        # Preview on port 8080
  great-docs preview --site-dir /tmp/weathervault-site
```
