diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e347452f..648e0c66 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,6 +52,28 @@ mdbook build Don't forget to remove the changes in `book.toml` before you commit! +## Writing style guide + +This section contains what is a *somewhat loosely* applied style guide for writing that is contributed to `component-docs`. + +### Executable code fragments + +For code that should be executed by the user in their console of choice, prefer using `sh`/`bash`. While not every user's +shell is `sh` or `bash` (with `zsh` being incredilby common), `sh`/`bash` provide a decent approximation. + +Importantly, code that is meant to be executed should be copy-pastable -- and should not contain `$` as a prefix. For example: + +```sh +echo 'this is an example'; +``` + +On the other hand, when commands *and* output are shown, use `console` and *do* prefix the command with `$` to differentiate it (or `#` in a sudo context): + +```console +$ echo 'this is an example'; +this is an example +``` + ## Submitting Changes You can click the Fork button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called a fork. Make any changes you want in your fork, and when you are ready to submit those changes, go to your fork and create a new pull request to let us know about it.