Skip to content

Commit

Permalink
chore: readme and contributing (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiskevinwang committed Jul 22, 2022
1 parent b61403b commit 06cd54f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/CONTRIBUTING.md
Expand Up @@ -50,7 +50,7 @@ or submitting a patch.

## New Issue

We welcome issues of all kinds including feature requests, bug reports or documentation suggestions. Below are guidelines for well-formed issues of each type.
We welcome issues of all kinds including feature requests, bug reports or documentation contributions. Below are guidelines for well-formed issues of each type.

### Bug Reports

Expand All @@ -67,6 +67,20 @@ It is possible we already fixed the bug you're experiencing.

- [ ] **Include a use case description**: In addition to describing the behavior of the feature you'd like to see added, it's helpful to also lay out the reason why the feature would be important and how it would benefit the wider Terraform ecosystem. Use case in context of 1 provider is good, wider context of more providers is better.

### Documentation Contributions

- [ ] **Search for possible duplicate suggestions**: It's helpful to keep
suggestions consolidated to one thread, so do a quick search on existing
issues to check if anybody else has suggested the same thing. You can scope
searches by the label `documentation` to help narrow things down.

- [ ] **Describe the questions you're hoping the documentation will answer**:
It's very helpful when writing documentation to have specific questions like
"how do I implement a default value?" in mind. This helps us ensure the
documentation is targeted, specific, and framed in a useful way.

- [ ] **Contribute**: This repository contains the markdown files that generate versioned documentation for [terraform.io/plugin/sdkv2](https://www.terraform.io/plugin/sdkv2). Please open a pull request with documentation changes. Refer to the [website README](../website/README.md) for more information.

## New Pull Request

Thank you for contributing!
Expand Down
42 changes: 42 additions & 0 deletions website/README.md
@@ -0,0 +1,42 @@
# Terraform Documentation

This directory contains the portions of [the Terraform website][terraform.io] that pertain to the Terraform Plugin SDK.

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.

## Updating Sidebar Navigation

You must update the sidebar navigation for the `terraform-plugin-sdk` documentation any time that you add or delete a documentation page. The website builds the sidebar navigation menu from the [nav-data] JSON file. For more details about how to update this file, refer to https://github.com/hashicorp/terraform-website#editing-navigation-sidebars.

## Adding Redirects

You must add a redirect when you move, rename, or delete documentation pages. Refer to https://github.com/hashicorp/terraform-website#redirects for details.

## Previewing Changes

You should preview your changes locally to ensure that the content is rendering properly before you create 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.

To preview your content, complete the following steps:

**Set Up Local Environment**

1. [Install Docker](https://docs.docker.com/get-docker/).
1. Restart your terminal or command line session.

**Launch Site Locally**

1. Navigate into your local `terraform-plugin-sdk` top-level directory and run `make website`.
1. Open `http://localhost:3000` in your web browser. While the preview is running, you can edit pages and Next.js will automatically rebuild them.
1. When you're done with the preview, press `ctrl-C` in your terminal to stop the server.

## Deployment

The website reads content from release tags to generate documentation for all versions of `terraform-plugin-sdk` documentation. Changes merged into `main` will be included in the documentation for the next product release.

You cannot edit documentation for past versions of `terraform-plugin-sdk` on the site. Documentation is an artifact of a product release. We push docs fixes forward for the next release, rather than retroactively fixing older versions.

[nav-data]: ../website/data/plugin-sdk-nav-data.json
[terraform.io]: https://www.terraform.io/

0 comments on commit 06cd54f

Please sign in to comment.