Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: contributing and readme #88

Merged
merged 1 commit into from Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/CONTRIBUTING.md
Expand Up @@ -36,7 +36,7 @@ described at https://www.hashicorp.com/security#vulnerability-reporting
## 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
documentation contributions. Below are guidelines for well-formed issues of each
type.

### Bug Reports
Expand Down Expand Up @@ -70,7 +70,7 @@ type.
the wider Terraform ecosystem. A use case in the context of 1 provider is
good, a use case in the context of many providers is better.

### Documentation Suggestions
### Documentation Contributions

- [ ] **Search for possible duplicate suggestions**: It's helpful to keep
suggestions consolidated to one thread, so do a quick search on existing
Expand All @@ -81,6 +81,7 @@ type.
It's very helpful when writing documentation to have specific questions like
"how do I default a subsystem logger to off?" 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/log](https://www.terraform.io/plugin/log). Please open a pull request with documentation changes. Refer to the [website README](../website/README.md) for more information.

## New Pull Request

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

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-log` 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-log` 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-log` 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-log` 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-log-nav-data.json
[terraform.io]: https://www.terraform.io/