Blocks & Quotes

This page showcases different block types in AsciiDoc.

Sidebar Block

This is a sidebar block.

Sidebars are used for supplementary content that relates to but is separate from the main text. They’re often used for tangential information, fun facts, or related topics.

  • Sidebars can contain lists

  • And other block elements

  • Like this one

Example Block

Example 1. Example: Basic Configuration

Here’s an example of a basic configuration:

site:
  title: My Documentation
  url: https://docs.example.com

This configuration sets the site title and base URL.

Example 2. Example: With Multiple Steps

Follow these steps:

  1. Create a new file

  2. Add the configuration

  3. Save and test

touch config.yml
echo "site:" >> config.yml
antora config.yml

Quote Block

Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world.

— Albert Einstein

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

— Douglas Adams
The Hitchhiker's Guide to the Galaxy

Quote Without Attribution

This is a blockquote without attribution. It can span multiple paragraphs.

Second paragraph of the quote.

Short Quote

Simple, direct quotes work well for emphasis.

Verse Block

Shall I compare thee to a summer’s day?
Thou art more lovely and more temperate:
Rough winds do shake the darling buds of May,
And summer’s lease hath all too short a date.
— William Shakespeare
Sonnet 18

Literal Block

A literal block preserves whitespace and displays text in a monospace font:

   ,---.
  /     \
 |       |
 |  ^_^  |
 |       |
  \     /
   `---'

Listing Block

This is a listing block.
It's similar to a literal block but uses different delimiters.
Commonly used for terminal output or file contents.

$ command --option value
Output line 1
Output line 2

Open Block

An open block is a generic container that can hold other blocks:

This is an open block.

It can contain:

  • Lists

  • Paragraphs

  • Other elements

console.log('Even code blocks!');

Passthrough Block

A passthrough block passes content directly through without processing:

This HTML is passed through directly.

Collapsible Block (Details)

Details

This content is hidden by default.

Click the summary to reveal it.

  • Hidden item 1

  • Hidden item 2

  • Hidden item 3

Click to reveal advanced configuration
advanced:
  cache:
    enabled: true
    ttl: 3600
  logging:
    level: debug
    format: json

Comment Block

The comment block above is not visible in the rendered output.

Block with Role

This paragraph has the "lead" role applied, making it stand out as introductory text.

This paragraph is centered using the text-center role.

Nested Blocks

Example 3. Outer Example

This is the outer example block.

Inner Sidebar

This sidebar is nested inside the example block.

Nesting blocks can help organize complex content.

Back to the outer example block.