Sidebars

On this page, you’ll learn:

  • How to mark up a sidebar with AsciiDoc.

Sidebar syntax

A sidebar can contain any type of content such as quotes, equations, and images. Normal substitutions are applied to sidebar content.

Sidebar paragraph

If the sidebar content is contiguous, the block name sidebar can be placed directly on top of the text in an attribute list ([]).

Example 1. Sidebar paragraph syntax
[sidebar]
Sidebars are used to visually separate auxiliary bits of content that supplement the main text.
Sidebars are used to visually separate auxiliary bits of content that supplement the main text.

Delimited sidebar block

A sidebar block is delimited by a set of four consecutive asterisks (****). You don’t need to set the block name when you use a delimited block.

Example 2. Delimited sidebar block syntax
.Optional Title
****
Sidebars are used to visually separate auxiliary bits of content that supplement the main text.

TIP: They can contain any type of content.

.Source code block in a sidebar
[source,js]
----
const { expect, expectCalledWith, heredoc } = require('../../../test/test-utils')
----
****
Optional Title

Sidebars are used to visually separate auxiliary bits of content that supplement the main text.

They can contain any type of content.
Example 3. Source code block in a sidebar
const { expect, expectCalledWith, heredoc } = require('../../../test/test-utils')