2017-06-27 16:40:13 -05:00
# Terraform Documentation
This directory contains the portions of [the Terraform website ](https://www.terraform.io/ ) that pertain to the
core functionality, excluding providers and the overall configuration.
The files in this directory are intended to be used in conjunction with
[the `terraform-website` repository ](https://github.com/hashicorp/terraform-website ), which brings all of the
different documentation sources together and contains the scripts for testing and building the site as
a whole.
2021-07-02 11:08:00 -05:00
## Previewing Changes
2021-07-02 12:51:00 -05:00
You should preview all of your changes locally before creating a pull request. The build includes content from this repository and the [`terraform-website` ](https://github.com/hashicorp/terraform-website/ ) repository, allowing you to preview the entire Terraform documentation site. If `terraform-website` isn't in your `GOPATH` , the preview command will clone it to your machine.
2021-07-02 11:08:00 -05:00
**Set Up Local Environment**
1. [Install Docker ](https://docs.docker.com/get-docker/ ).
2021-07-02 12:49:59 -05:00
1. Create a `~/go` directory manually or by [installing Go ](https://golang.org/doc/install ).
1. Open terminal and set `GOPATH` as an environment variable:
2021-07-02 11:16:45 -05:00
2021-07-02 11:19:28 -05:00
Bash: `export $GOPATH=~/go` (bash)
2021-07-02 11:16:45 -05:00
2021-07-02 11:19:28 -05:00
Zsh: `echo -n 'export GOPATH=~/go' >> ~/.zshrc`
2021-07-02 12:49:59 -05:00
1. Restart your terminal or command line session.
2021-07-02 11:08:00 -05:00
**Launch Site Locally**
2021-07-02 11:29:35 -05:00
1. Navigate into your local `terraform` top-level directory and run `make website` .
3. Open `http://localhost:4567` in your web browser. While the preview is running, you can edit pages and Middleman will automatically rebuild them.
2021-07-02 12:50:09 -05:00
4. When you're done with the preview, press `ctrl-C` in your terminal to stop the server.