-
Notifications
You must be signed in to change notification settings - Fork 685
Documentation Guidelines
As part of the Definition of Done, documentation is a necessary part of any deliverable. Use these guidelines for any documentation you create in a Pull Request.
-
Documentation can be in the form of a series of notes for the tech writer to work from.
-
Docs you provide does not have to be in a perfect state, but it should provide enough details for the tech writer to write a final draft.
-
Documentation must be in Markdown format.
-
Documentation updates that affect the current release can be made directly to the file.
-
If a doc update on a file only affects the next release, copy the directory containing the
index.md
file into thepwa-devdocs/_drafts
directory and make the changes to that draft version. -
Documentation that is not ready to be published must be created in the
pwa-devdocs/_drafts
directory. -
Break up sentences into separate lines to make the raw markdown easier to read and review.
Example:
The quick brown fox jumps over the lazy dog. Grumpy wizards make toxic brew for the evil queen and jack.
-
Use reference-style links to make the raw markdown easier to read and review. Link definitions must be located at the bottom of the page.
Example:
Visit [Daring Fireball][] for more information. [Daring Fireball]: http://daringfireball.net/
All public API in Peregrine and Venia components require documentation in the source code.
Source code documentation must follow JSDoc format so it can be converted into a markdown topic.
Component documentation must include the following:
- A description of the function/object
- A list of any parameters or properties it expects and a description for each
- A description of the return type (if any)
Example: ToastContainer documentation in source code
Follow these steps to generate the markdown files from JSDocs in files:
-
Navigate to the
pwa-devdocs
directory -
Install the node dependencies:
npm install
-
Add the component file path to one of the following files:
pwa-devdocs/scripts/create-reference-docs/config/peregrine/index.js
pwa-devdocs/scripts/create-reference-docs/config/venia-concept/index.js
-
Build the reference docs:
npm run build:reference-doc-snippets
-
Auto-generated files will be located in the
pwa-devdocs/src/_include/auto-generated
directory
Feature documentation is required for any new PWA Studio feature that third party developers can use or configure in their own projects.
The documentation must have the following content:
- A description of the feature (What is it?)
- Use cases for the feature (Why should I use it?)
- A simple example of the feature (How do I use it?)
- Descriptions of the API and its configuration points
Example: REST API client
- Sync calls:
- Check the calendar
- Recordings - https://goo.gl/2uWUhX
- Slack: #pwa Join #pwa
- Contributing
- Product