Get started with writing documentation
This guide includes everything you need to complete your documentation project from start to finish.
Goals
This guide:
- Teaches you how to successfully document products and features
- Provides a step-by-step guide from project kick-off to release
- Introduces you to the craft of creating good documentation
Audience
- Software developers who need to create documentation alongside code
- Other technical roles that create and contribute to documentation
Before you begin
- Consider what you want someone reading your documentation to understand or accomplish
Project checklist
If you have questions:
- and you are a Grafana Labs employee, reach out in the
#docs
channel on the internal Slack workspace. - and you aren’t a Grafana Labs employee, reach out in the
#docs
channel on the community Slack workspace.
To get started:
- Plan the work
- Create the structure
- Draft the documentation
- Review the documentation
- Publish the documentation
Plan the work
Decide what kind of documentation deliverables you need. What do you want a user to accomplish?
Know the release life cycle stage of the product or feature. Review the Release cycle for Grafana Labs.
Create the structure
Add documentation to your GitHub repository. Add a
docs/sources
directory to your repository, if it doesn’t already exist.Create the folders and structure. Use the content framework for consistency across product documentation. For more information about the content framework, refer to Documentation structure.
Draft the documentation
Learn how to best write and organize your documentation. Read the topic types topic and sub-topics in the Writers’ Toolkit.
Add front matter. Read the front matter documentation.
Add images and media. Read the image, diagram, screenshot, and video guidelines documentation.
Use links. Refer to the links documentation.
Add code samples. To add samples with Markdown, refer to Code blocks. For style guidance, refer to Code examples. For samples in multiple languages, refer to Code.
Refer to the Style conventions.
Review the documentation
- Build the documentation locally. For instructions, refer to Test documentation changes.
- Open a pull request and use the label
type/docs
. - Use
doc-validator
and the Vale prose linter. These are often automatic checks from within the PR itself. To learn more about [doc-validator
], refer to Automated validation with doc-validator. To learn more about the Vale prose linter, refer to Lint prose with the Vale linter.
Publish the documentation
- Review publishing options.
If you are a Grafana Labs employee, reach out in the
#docs
channel on the internal Slack workspace. If you aren’t a Grafana Labs employee, reach out in the#docs
channel on the community Slack workspace. - Backport, if required. For guidance, refer to Backport changes.
- Add What’s new or release notes, if required. For guidance, refer to Contribute to What’s new or release notes.