docs/doc/source/contributor/doc_contribute_guide.rst
Kristal Dale 94801b9fc4 Update Documentation Contributor Guide
Update the Documentation Contributor Guide to use the existing
OpenStack doc contribution guides (for setup, making changes, making
a commit, making a review).

Change-Id: I6b0ffff61e71dd5a90d038841348d90e206c41ec
Signed-off-by: Kristal Dale <kristal.dale@intel.com>
2020-02-26 15:11:34 -08:00

11 KiB

Documentation Contributor Guide

This section describes the guidelines for contributing to the StarlingX documentation.

Quickstart

The StarlingX documentation uses reStructuredText (RST) markup syntax with Sphinx extensions. It uses the same contribution setup and workflow as the OpenStack documentation.

Setup for contribution

Follow the OpenStack instructions Setting up for contribution.

Make a change

  1. Make changes following the OpenStack instructions for
    1. Starting a change

    2. Committing a change.

      Note

      StarlingX requires the use of a Signed-off-by header. Use the -s option with git commit.

  2. When writing documentation, follow Writing style and RST conventions.
  3. Build the documentation locally to verify your changes before committing. Follow the OpenStack instructions for Building documentation.
  4. If needed, follow up with edits to your patch following the OpenStack instructions for Responding to requests.

Find tasks and help needed

If you are looking for work to complete:

If you make a contribution that has an the associated story, task, or bug in the comment, link to the related story or bug as described in the Code Submission Guidelines <link-review-to-story>.

Docs organization

Documentation for StarlingX is organized into the following sections:

/introduction/index

Overview of the StarlingX project.

/deploy_install_guides/index

Release-specific installation and deployment guides.

/configuration/index

Configuration references for post-installation StarlingX system configuration.

/operations/index

System administration and maintenance guides.

/api-ref/index

REST API references for the StarlingX project. For additional information about where REST API documentation is located, see API documentation.

/cli_ref/index

Reference for the StarlingX project command line interface (CLI).

/developer_resources/index

Resources for developers using or building StarlingX.

/releasenotes/index

Release notes for all StarlingX releases.

/contributor/index

Overview and guidelines for contributing to StarlingX documentation.

API documentation

The structure and location of the REST API documentation deserves extra explanation.

Most REST API content is generated from the StarlingX project associated with the API. For example, the documentation for the StarlingX metal REST API is generated from the metal repository.

API references for StarlingX extensions are part of the docs repository, located in the api-ref project:

  • StarlingX extensions to the OpenStack Block Storage API
  • StarlingX extensions to the OpenStack Compute API
  • StarlingX extensions to the OpenStack Image API
  • StarlingX extensions to the OpenStack Networking API

The api-ref project also contains index pages used by Sphinx to generate the final content tree. Note that the REST API landing page used to render content in the generated website is found in the doc project.

For additional information on the API documentation, refer to api_contribute_guide.

Spec documentation

Spec documentation is found in the Starlingx specs project.

The specs/2019.03 directory contains the documentation files for approved and implemented specs.

Writing style

StarlingX documentation follows many (but not all!) of the writing style guidelines described in the OpenStack documentation writing style guide. Differences between the StarlingX and OpenStack practices are highlighted below.

  • Use Title Case for page titles. For example:

    ===============================
    Documentation Contributor Guide
    ===============================
  • Start section titles with an action verb, but not a gerund (word that ends with -ing). For example:

    ------------------
    Configure endpoint
    ------------------

RST conventions

StarlingX documentation follows many (but not all!) of the RST conventions described in the OpenStack documentation RST conventions guide. If RST markup is not listed in this section's quick reference, refer to the OpenStack guide.

For detailed information about RST and Sphinx extensions, refer to the following documents:

RST quick reference

Acronyms

Define acronym at first instance on page. After definition, use acronym only.

Input:

:abbr:`CPU (Central Processing Unit)`

Output:

CPU (Central Processing Unit)

Code samples

Format code snippets as standalone literal blocks.

Input:

::

  ping 8.8.8.8

Output:

ping 8.8.8.8

Commands

Format commands using the Sphinx command role.

Input:

:command:`system help`

Output:

Use the system help command for the full list of options.

Cross-references

Cross-reference to arbitrary locations in a document using the ref role and a named target. Named targets must precede a section heading. For more information on references, see Internal Hyperlink Targets

Input:

.. _my_named_target:

~~~~~~~~~~
My section
~~~~~~~~~~

This is the section we want to reference.

...

This is the reference to :ref:`my_named_target`.

Output:

My section

This is the section we want to reference.

...

This is the reference to my_named_target.

Information blocks

Emphasize information using notices (an 'admonition' in Sphinx). Different types of notices exist to emphasize degrees of information importance.

Input:

.. note::

   Use a ``note`` for a generic message.

.. seealso::

   Use ``seealso`` for extra but helpful information.

.. important::

   Use ``important`` for details that can be easily missed, but should not be
   ignored by a user and are valuable before proceeding.

.. warning::

   Use ``warning`` to call out information the user must understand
   to avoid negative consequences.

Output:

Note

Use a note for a generic message.

Use seealso for extra but helpful information.

Important

Use important for details that can be easily missed, but should not be ignored by a user and are valuable before proceeding.

Warning

Use warning to call out information the user must understand to avoid negative consequences.

Inline elements

Format most inline elements such as filenames and paths, code fragments, parameters, or options with double back ticks.

Input: :

``/path/to/file.name``
``--option``

Output:

Open the /path/to/file.name file.

Optionally pass the --option with the command.

Refer to the OpenStack Inline elements guide for markup for other inline elements.

Lists

Use a bulleted list for a sequence of items whose order does not matter, such as a list of features.

Input:

* Banana
* Apple
* Orange

Output:

  • Banana
  • Apple
  • Orange

Use an enumerated list for a sequence of items whose order matters, such as in an ordered sequence of installation steps.

Input:

#. Wash apple.
#. Peel apple.
#. Eat apple.

Output:

  1. Wash apple.
  2. Peel apple.
  3. Eat apple.

Use a definition list for an unordered list where each item has a short definition, such as term/definition pairs.

Input:

Command A
  Description of command A.

Command B
  Description of command B.

Output:

Command A

Description of command A.

Command B

Description of command B.

Section headings

Use up to three levels of headings in one file using the following characters:

  • Heading 1 (Page Title in Title Case) - underline and overline with equal signs;
    • Heading 2 (Major page sections in Sentence case) - underline and overline with dashes;
      • Heading 3 (subsections in Sentence case) - underline and overline with asterisks.

Example RST:

==============
Document Title
==============

Introduce the topic using 1-2 concise sentences. It should tell the user what
info can be found on this page.

.. contents::  // Use a local TOC to aid user navigation in the page
   :local:
   :depth: 1

---------------
Section heading
---------------

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

******************
Subsection heading
******************

Integer sed tortor nisi. Vivamus feugiat, urna in posuere gravida, ligula nunc hendrerit magna, nec tristique ex tortor non lorem.