From any documentation page on docs.sensu.io, select "Edit this page". This will take you to the corresponding markdown file in GitHub, create a fork of this repository, and create a new branch for your contribution. Make your changes to the markdown content, then select "Propose changes" and follow the prompts to submit a pull request. If you have any questions, feel free to open an issue.
Command line workflow
These instructions will help you fork this repository, create a branch, and submit a pull request.
1) Fork on GitHub
Fork the appropriate repository by clicking the Fork button (top right) on GitHub.
2) Create a local fork
From the directory where you want to save this code, clone this repository and set up the upstream remote:
$ git clone https://github.com/REPLACEME/sensu-docs/ # or: git clone firstname.lastname@example.org:REPLACEME/sensu-docs.git $ cd sensu-docs $ git remote add upstream https://github.com/sensu/sensu-docs.git # or: git remote add upstream email@example.com:sensu/sensu-docs.git
3) Create a branch for your contribution
Begin by updating your local fork:
$ git fetch upstream $ git checkout master $ git rebase upstream/master
Create a new branch with a descriptive name to contain your change:
$ git checkout -b fix-code-samples
4) Build and test
See the Sensu Docs style guide for formatting instructions and style conventions.
To build the site, run
yarn. This builds the search index and compiles the static content.
You can then run
yarn run server to view the site real-time as you edit.
Commit your changes with a descriptive commit message.
$ git commit -am "fix invalid JSON"
Repeat the commit process as often as you need and edit/test/repeat. To add minor edits to your last commit:
$ git add -u $ git commit --amend
This project uses commit hooks to test the build whenever making a commit.
6) Push to GitHub
When your're ready to commit for review (or if you just want to establish an offsite backup or your work), push your branch to your fork on GitHub:
$ git push origin feature/myfeature
If you recently used
commit --amend, you may need to force push:
$ git push -f origin feature/myfeature
7) Create a pull request
Create a pull request by visiting sensu/sensu-docs on GitHub and following the prompts. We'd appreciate it if you could allow edits to your PR from Sensu docs maintainers.
After the PR is submitted, project maintainers will review it.
If you'd like to mark your PR as work in progress, add
[WIP] to the PR title.
Updating multiple versions of the docs
Some contributions apply to multiple versions of Sensu, or other sections of the documentation. We appreciate if you have a chance to copy these edits to all applicable versions.
If you have a good idea on how to script this type of behavior, please comment on this issue discussing ideas.
This repository is one of many that are community supported around Sensu. See all the ways you can get involved by visiting the Community repository.
One of the most helpful ways you can benefit the Sensu community is by writing about how you use Sensu. Write up something on Medium, embed Gists for longer code samples and let us know in Slack! We'll publish it to the blog at blog.sensu.io.