Files
kata-containers/Documentation-Requirements.md
James O. D. Hunt 1344bc5f84 docs: Document image requirements
Update the documentation requirements on the topic of images.

Fixes #189.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-06 07:48:08 +01:00

2.9 KiB

Introduction

This document outlines the requirements for all documentation in the Kata Containers project.

General requirements

  • All documents are expected to be written in GitHub Flavored Markdown format.
  • All documents should have the .md file extension.

Notes

Important information that is not part of the main document flow should be added as a Note in bold with all content contained within block quote:

Note: This is areally important point!

This particular note also spans multiple lines. The entire note should be included inside the quoted block.

If there are multiple notes, bullets should be used:

Notes:

  • I am important point 1.

  • I am important point 2.

  • I am important point n.

Code blocks

This section lists requirements for displaying commands and command output.

The requirements must be adhered to since documentation containing code blocks is validated by the CI system, which executes the command blocks with the help of the doc-to-script utility.

  • If a document includes commands the user should run, they MUST be shown in a bash code block with every command line prefixed with $ to denote a prompt:

    
        ```bash
        $ echo "Hi - I am some bash code"
        $ sudo docker run -ti busybox true
        $ [ $? -eq 0 ] && echo "success!"
        ```
    
    
  • If a command needs to be run as the root user, it must be run using sudo(8).

    
    $ sudo echo "I'm running as root"
    
  • All lines beginning # should be comment lines, NOT commands to run as the root user.

  • In the unusual case that you need to display command output, use an unadorned code block (```):

    
        The output of the `ls(1)` command is expected to be:
    
        ```
        ls: cannot access '/foo': No such file or directory
        ```
    
    

Images

All binary image files must be in a standard and well-supported format such as PNG. This format is preferred for vector graphics such as diagrams because the information is stored more efficiently, leading to smaller file sizes. JPEG images are acceptable, but this format is more appropriate to store photographic images.

When possible, generate images using freely available software.

Every binary image file MUST be accompanied by the "source" file used to generate it. This guarantees that the image can be modified by updating the source file and re-generating the binary format image file.

Ideally, the format of all image source files is an open standard, non-binary one such as SVG. Text formats are highly preferable because you can manipulate and compare them with standard tools (e.g. diff(1)).