Welcome to the Sensu Docs project! This repository is the home of docs.sensu.io.
Read the docs | Contributing guide | Style guide | Code of conduct | [Contact admins][discourse] | Open an issue
We welcome all contributions! Read the contributing guide to get started.
For details on formatting and style, see the Sensu Docs style guide. If you have any questions, please submit an issue, or feel free to reach out in #documentation in the Sensu Community Slack.
From the docs site, select "Edit this page" to go to the corresponding markdown file in GitHub. From there, GitHub will prompt you to create a fork and submit a pull request. You can also submit documentation feedback by opening an issue.
The Sensu Docs site is a static site built with Hugo and markdown. These instructions will help you get the site running locally.
To contribute to the Sensu Docs, please read the contributing guide.
NOTE: You must install node version 12 through 18 to run the docs locally.
-
Install Git on your computer and authenticate using HTTPS or SSH. Skip this step if you already have Git set up and authenticated on your computer.
-
Install Yarn on your computer. Sensu Docs uses Yarn to manage dependencies and the build process.
You can clone the repo using either HTTPS or SSH.
Clone using HTTPS:
git clone https://github.com/sensu/sensu-docs.git && cd sensu-docs
Clone using SSH:
git clone [email protected]:sensu/sensu-docs.git && cd sensu-docs
If you prefer, download the repo from GitHub.
Run:
yarn
This will install Hugo and build the site into the public
directory.
If the site builds successfully, run:
yarn run server
This builds the Hugo server so you can view the site in your local web browser at http://localhost:1313/.
NOTE: If you navigate to a URL that uses the latest
rewrite, such as http://localhost:1313/sensu-go/latest/
, the local site will return a 404 error. Replace latest
in the URL with a published docs version (for example, http://localhost:1313/sensu-go/6.9/
) when running the docs locally.
Here are some things to try if you encounter an issue working with the site:
- Run
yarn hugo-version
to print the running version of Hugo. Version 0.101.0 or newer is required. - Make sure you are running node version 12 through 18.
- If you're still having trouble viewing the site, open an issue, and we'll be happy to help!
The docs site displays incorrectly in Internet Explorer. If you cannot use a different browser, you can access a PDF copy of the Sensu documentation on our supported versions page.
Offline documentation uses a set of layouts located in the offline
directory. To preview them:
yarn run server --layoutDir=offline
To exclude content from the offline documentation, add this line to the front matter in the markdown file:
offline: false
Whenever changes are merged to the main
branch, this project is automatically deployed to docs.sensu.io. For additional details on Heroku configuration and deployment, see our wiki page.