Page title

Language Icon 29 days ago · 8 min read
Cloud Server v4+
Contribute Go to Code

This template will help you create a new docs page that shows the reader how to carry out a task and accomplish a specific goal with CircleCI. Content templates help you to:

  • Develop new content quickly

  • Ensure your page conforms to the CircleCI docs style guide

The file name for the new page should exactly match the page title. Look at the source file for this page template here.

Include one opening paragraph to briefly describe what the reader will do by following the guide. The information in the opening paragraph should help answer the following questions for the reader:

  • Why should I be interested in this task?

  • How will this task help me create more value in my usage of CircleCI?

If available, provide a link to an overview or conceptual doc for more explanatory or background information regarding the task.

Prerequisites

List any prerequisites that the reader needs to have already met in order to successfully complete the task. These may include:

  • Completing a certain task, such as signing up for a CircleCI account and having at least one project building in CircleCI

  • CircleCI plan requirements

  • Roles and permissions

  • Skills/knowledge

    • Link to any helpful documentation or pages that they can refer to, for example, "For more information on how test splitting works, refer to the Test splitting and parallelism page."

  • Any other dependencies

1. Carry out the task

The main body of the guide should be broken into logical steps, with headings for each step. The steps should guide the reader through carrying out the task.

Write the section headings with an active voice to show what will be done. The reader should ideally be able to read the page table of contents and understand what they will achieve and how.

In a how-to guide, you might walk the reader through an example scenario. Examples should be based on real-world use cases as much as possible and address business objectives.

1.1 This is a subsection title

Subsections can be used to break steps into logical sub-parts as needed. Level 3 section titles (===) should also be ordered:

Break up large blocks of text where possible to help make it easier to consume. You can use bullet lists:

  • Item 1

  • Item 2

  • Item 3

1.2. Using tables

This section shows how to create a table. This example has one heading row and one regular row. The table has three columns, and the third column is twice as wide as the first two columns. THe table has a title.

Table 1. This is a table
Header text column 1 Header text column 2 Header text column 3

Text for row 1 column 1

Text for row 1 column 2

Text for row 1 column 3

For a full description of the options available, including merging cells, and cell formatting, see the Asciidoctor docs.

To link out to content outside of the docs use a link:

To link to another page within the docs use a cross reference:

You can place the subsection anchor using a hash symbol if you want to link to a subsection:

1.4. Code examples

Whenever possible, the how-to guide should provide examples that cover most widely used languages and frameworks, unless the guide itself is specific to a particular language, platform, or framework.

Use AsciiDoc source blocks for code examples, with a title where possible. Use comments in the code block to explain what is happening:

Add a line to explain what is in the code block
version: 2.1
jobs:
  build:
    docker: # use a docker image to run the job
      - image: cimg/base:2021.04
    steps:
      - checkout # check out the code in the project directory
      - run:
          name: The First Step
          command: |
            echo 'Hello World!'
            echo 'This is the delivery pipeline'
      - run:
          name: The Second Step
          command: |
            ls -al
            echo '^^^The files in your repo^^^'

5. Banners

Use admonitions to create blocks of content that stand out from the main flow of text. Use admonitions sparingly as they can be distracting or lose emphasis if they appear too often. Currently we have the option to include tips notes, cautions, and warnings, as follows:

Need to add a tip? This is how to do it
Need to add a note? This is how to do it
Need to add a caution? This is how to do it
Need to add a warning? This is how to do it

Use a short section in bold at the start of the admonition to try to attract the readers attention.

If you need a longer admonition you can use a sidebar block:

This admonition is longer and includes an ordered list:

  1. Step 1

  2. Step 2

  3. Step 3

For more information, see the CircleCI style guide.

2. The second step

Each main step in the how-to guide should be under its own level 2 (==) heading, using the numbered list format.

2.2. This is a subsection title

You may want to add an image, you can do this using a block image macro:

Alternative text to describe the image
Figure 1. Image Title

You can also use an inline icon in a paragraph of text, for example the edit icon edit icon.

2.3 Use tabs to show different options

Use tabs to show different options:

  • Tab A

  • Tab B

Content for Tab A

Content for Tab B

Use tabs to show options for a single task when there are multiple ways to achieve the same outcome, or to show how to configure a thing in multiple ways.

Conclusion

End the guide with a conclusion section that summarizes what was covered.