Additional Features

Additional Features

Collapsible Example Blocks

AsciiDoc collapsible example blocks are translated to Confluence with help of the expand macro.

[%collapsible]
====
This content is revealed when the label is clicked.
====
 Click here to expand...

This content is revealed when the label is clicked.

An optional block title can be specified:

.Toggle Me
[%collapsible]
====
This content is revealed when the "Toggle Me" label is clicked.
====
 Toggle Me

This content is revealed when the "Toggle Me" label is clicked.

Non-collapsible example blocks are currently converted to a tip admonition, since Confluence does not provide any specified example element.

Using the open option on collapsible expand blocks is currently not supported.

Source File Information

The Confluence Publisher automatically exposes information about the source AsciiDoc file being processed through built-in attributes. These attributes can be used in your AsciiDoc content to reference information about the current file:

AttributeDescriptionExample Value
cp-source-pathThe relative path of the source file from the base directorypages/user-guide.adoc
cp-source-fileThe filename of the source file including extensionuser-guide.adoc
cp-source-nameThe filename of the source file without extensionuser-guide

Usage Examples

The source file path is: {cp-source-path}

The source file path is: 00-index/13-additional-features.adoc

This page was generated from: {cp-source-file}

This page was generated from: 13-additional-features.adoc

The page name is: {cp-source-name}

The page name is: 13-additional-features