Documentation Topics


Topics organize Examples into an easily digestible page. They should be self-contained and written for the benefit of the reader in a hurry.

Creating a Topic

Use the following steps to create a topic:

  1. Click Create New Topic on the tag's dashboard.
  2. Name the topic.
  3. Provide detailed examples in the "Examples" section.
  4. If you have more to share, use the "Syntax," "Parameters," and "Remarks" sections.

You have successfully created a topic! The topic will be available to everyone, and everyone can edit it.

Remember that in Stack Overflow Documentation, examples are the star of the show!

Anatomy of a Topic

A topic is made up of several sections:

Title: What is the subject of the topic. Search existing topics first to make sure you are not repeating content that already exists. Topics already covered elsewhere on Stack Overflow may be deleted.

Versions: The versions where the material covered by the topic applies. You may pick from any of the versions listed in the introduction topic, or remove them all to indicate that the topic applies to all versions. See Versions for more information.

Introduction (optional): Explains the organizing principle of the contained examples to both readers and contributors. It resides above the examples and is limited to 500 characters.

Examples: Code examples for the topic. The code should be easy to read and well commented. Prose should also be used to explain the concepts needed to understand the code, but try not to be overly verbose.

One example per topic can be "pinned", meaning it floats above the other examples. This can be useful for an extended intro that is too long for the Introduction section.

Syntax (optional): It may be appropriate to include a syntax for the topic at hand. This section is always a code block and must be a markdown list:

- class.method(required_parameter [, optional])
- function f(int x) = { code defining what the function does }

Parameters (optional): When describing a topic as with syntax, it may also be appropriate to include parameter details. Parameters are formatted as a two-column table:

| Parameter | Details |  
| --------- | ------- | 
|       yin |    dark | 
|      yang |   light |

Remarks (optional): Any additional Information regarding the topic that may prove valuable to the end reader. Remarks are freeform.

The Introductory topic

When a new documentation tag is created, StackOverflow automatically generates an introductory topic, acting as a placeholder for the first actual topic.

The introductory topic contains placeholder texts and pointers to point contributors in the right directions for helping expanding on the new documentation tag.

Please note that introductory topics cannot be deleted. See this question