Skip to content

Commit 06cd54f

Browse files
chore: readme and contributing (#1008)
1 parent b61403b commit 06cd54f

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

Diff for: .github/CONTRIBUTING.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ or submitting a patch.
5050

5151
## New Issue
5252

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

5555
### Bug Reports
5656

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

6868
- [ ] **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.
6969

70+
### Documentation Contributions
71+
72+
- [ ] **Search for possible duplicate suggestions**: It's helpful to keep
73+
suggestions consolidated to one thread, so do a quick search on existing
74+
issues to check if anybody else has suggested the same thing. You can scope
75+
searches by the label `documentation` to help narrow things down.
76+
77+
- [ ] **Describe the questions you're hoping the documentation will answer**:
78+
It's very helpful when writing documentation to have specific questions like
79+
"how do I implement a default value?" in mind. This helps us ensure the
80+
documentation is targeted, specific, and framed in a useful way.
81+
82+
- [ ] **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.
83+
7084
## New Pull Request
7185

7286
Thank you for contributing!

Diff for: website/README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Terraform Documentation
2+
3+
This directory contains the portions of [the Terraform website][terraform.io] that pertain to the Terraform Plugin SDK.
4+
5+
The files in this directory are intended to be used in conjunction with
6+
[the `terraform-website` repository](https://github.com/hashicorp/terraform-website), which brings all of the
7+
different documentation sources together and contains the scripts for testing and building the site as
8+
a whole.
9+
10+
## Updating Sidebar Navigation
11+
12+
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.
13+
14+
## Adding Redirects
15+
16+
You must add a redirect when you move, rename, or delete documentation pages. Refer to https://github.com/hashicorp/terraform-website#redirects for details.
17+
18+
## Previewing Changes
19+
20+
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.
21+
22+
To preview your content, complete the following steps:
23+
24+
**Set Up Local Environment**
25+
26+
1. [Install Docker](https://docs.docker.com/get-docker/).
27+
1. Restart your terminal or command line session.
28+
29+
**Launch Site Locally**
30+
31+
1. Navigate into your local `terraform-plugin-sdk` top-level directory and run `make website`.
32+
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.
33+
1. When you're done with the preview, press `ctrl-C` in your terminal to stop the server.
34+
35+
## Deployment
36+
37+
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.
38+
39+
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.
40+
41+
[nav-data]: ../website/data/plugin-sdk-nav-data.json
42+
[terraform.io]: https://www.terraform.io/

0 commit comments

Comments
 (0)