Skip to content

Commit

Permalink
Merge branch 'wtd19/improve-contrib-guide' of https://github.com/jerd…
Browse files Browse the repository at this point in the history
…og/netlify-cms into wtd19/improve-contrib-guide
  • Loading branch information
jerdog committed May 19, 2019
2 parents 2a76311 + 23d982f commit 89595e3
Showing 1 changed file with 136 additions and 0 deletions.
136 changes: 136 additions & 0 deletions website/content/docs/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,140 @@ Do: The copy is called a "fork".
Don't: The copy is called a "fork."
_____

## Inline code formatting

### Use code style for inline code and commands

For inline code in an HTML document, use the `<code>` tag. In a Markdown document, use the backtick (`).

Do: The `kubectl run` command creates a Deployment.

Don't: The "kubectl run" command creates a Deployment.
_____

Do: For declarative management, use `kubectl apply`.

Don't: For declarative management, use "kubectl apply".
_____

Do: Enclose code samples with triple backticks. `(```)`

Don't:Enclose code samples with any other syntax.
_____

### Use code style for object field names

Do: Set the value of the `replicas` field in the configuration file.

Don't: Set the value of the "replicas" field in the configuration file.
_____

Do: The value of the `exec` field is an ExecAction object.

Don't: The value of the "exec" field is an ExecAction object.
_____

### Use normal style for string and integer field values

For field values of type string or integer, use normal style without quotation marks.

Do: Set the value of `imagePullPolicy` to Always.

Don't: Set the value of `imagePullPolicy` to "Always".
_____

Do: Set the value of `image` to nginx:1.8.

Don't: Set the value of `image` to `nginx:1.8`.
_____

Do: Set the value of the `replicas` field to 2.

Don't: Set the value of the `replicas` field to 2.
_____

## Code snippet formatting

### Don’t include the command prompt

Do: kubectl get pods

Don't: $ kubectl get pods

## Content best practices

This section contains suggested best practices for clear, concise, and consistent content.

### Use present tense

Do: This command starts a proxy.

Don't: This command will start a proxy.

Exception: Use future or past tense if it is required to convey the correct meaning.

### Use active voice

Do: You can explore the API using a browser.

Don't: The API can be explored using a browser.
_____

Do: The YAML file specifies the replica count.

Don't: The replica count is specified in the YAML file.
_____

Exception: Use passive voice if active voice leads to an awkward construction.

### Use simple and direct language

Use simple and direct language. Avoid using unnecessary phrases, such as saying “please.”

Do: To create a ReplicaSet, ...

Don't: In order to create a ReplicaSet, ...
_____

Do: See the configuration file.

Don't: Please see the configuration file.
_____

Do: View the Pods.

Don't: With this next command, we'll view the Pods.
_____

### Address the reader as “you”

Do: You can create a Deployment by ...

Don't: We'll create a Deployment by ...
_____

Do: In the preceding output, you can see...

Don't: In the preceding output, we can see ...

### Avoid Latin phrases

Prefer English terms over Latin abbreviations.

Do: For example, ...

Don't: e.g., ...
_____

Do: That is, ...

Don't: i.e., ...
_____

Exception: Use “etc.” for et cetera.






0 comments on commit 89595e3

Please sign in to comment.