# excerpt and include macros in Confluence storage format

URL: https://goingstellar.ro/reference/confluence-storage-format/excerpt-include/

The excerpt macro marks content for reuse, the excerpt-include macro shows a marked excerpt from another page, and the include macro shows a whole page. The source page is an unnamed parameter holding an ac:link. All three map to Confluence extension nodes in ADF and keep their parameters.

## Storage format

```xml
<ac:structured-macro ac:name="excerpt"><ac:rich-text-body><p>excerpt text</p></ac:rich-text-body></ac:structured-macro>
<ac:structured-macro ac:name="excerpt"><ac:parameter ac:name="hidden">true</ac:parameter><ac:rich-text-body><p>hidden excerpt</p></ac:rich-text-body></ac:structured-macro>
<ac:structured-macro ac:name="excerpt-include"><ac:parameter ac:name=""><ac:link><ri:page ri:content-title="Page Title" /></ac:link></ac:parameter></ac:structured-macro>
<ac:structured-macro ac:name="include"><ac:parameter ac:name=""><ac:link><ri:page ri:content-title="Page Title" /></ac:link></ac:parameter></ac:structured-macro>
```

## In the editor

- Type /insertexcerpt to place the insert excerpt macro. Per the Atlassian documentation. The excerpt macro itself is found under the insert button, View more.

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
<ac:structured-macro ac:name="excerpt"><ac:parameter ac:name="hidden">true</ac:parameter><ac:rich-text-body><p>hidden excerpt</p></ac:rich-text-body></ac:structured-macro>
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "bodiedExtension",
   "attrs": {
    "extensionType": "com.atlassian.confluence.macro.core",
    "extensionKey": "excerpt",
    "parameters": {
     "macroParams": {
      "hidden": {
       "value": "true"
      },
      "_parentId": {
       "value": "<page id>"
      }
     },
     "macroMetadata": {
      "macroId": {
       "value": "<id>"
      },
      "schemaVersion": {
       "value": "1"
      },
      "title": "Excerpt"
     }
    }
   },
   "content": [
    {
     "type": "paragraph",
     "content": [
      {
       "text": "hidden excerpt",
       "type": "text"
      }
     ]
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<ac:structured-macro ac:name="excerpt"><ac:rich-text-body><p>excerpt text</p></ac:rich-text-body></ac:structured-macro>
```

Mark a paragraph for reuse. On its own page the excerpt text is shown as normal content.

Rendered view (HTML):

```html
excerpt text
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="excerpt" ac:schema-version="1" ac:macro-id="<id>"><ac:rich-text-body><p>excerpt text</p></ac:rich-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="excerpt"><ac:parameter ac:name="hidden">true</ac:parameter><ac:rich-text-body><p>hidden excerpt</p></ac:rich-text-body></ac:structured-macro>
```

Hide the excerpt on its own page while keeping it available to other pages.

Rendered view (HTML):

```html

```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="excerpt" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="hidden">true</ac:parameter><ac:rich-text-body><p>hidden excerpt</p></ac:rich-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="excerpt-include"><ac:parameter ac:name=""><ac:link><ri:page ri:content-title="Page Title" /></ac:link></ac:parameter></ac:structured-macro>
```

Pull an excerpt from another page. The page named in the macro does not exist, so the stored view is an error message.

Rendered view (HTML):

```html
<div class="error">Error rendering macro 'excerpt-include' : No link could be created for 'Page Title'.</div>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="excerpt-include" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name=""><ac:link><ri:page ri:content-title="Page Title" /></ac:link></ac:parameter></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="include"><ac:parameter ac:name=""><ac:link><ri:page ri:content-title="Page Title" /></ac:link></ac:parameter></ac:structured-macro>
```

Include a whole page. A missing page produces an error message in the view.

Rendered view (HTML):

```html
<div class="error conf-macro output-block" data-hasbody="false" data-macro-id="<id>" data-macro-name="include"><span class="error">Unable to render {include}</span> The included page could not be found.</div>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="include" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name=""><ac:link><ri:page ri:content-title="Page Title" /></ac:link></ac:parameter></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- excerpt is a bodiedExtension with key excerpt, and the hidden parameter is kept with its value.
- excerpt-include and include are extension nodes. The ac:link in the unnamed parameter is reduced to the page title in ADF and rebuilt as an ac:link with ri:page on the way back.
- In ADF the extension title is Insert excerpt for excerpt-include and Include Page for include.
- No loss was seen in the tested runs. Only a _parentId entry is added in ADF, and the macro id is regenerated.

## Pitfalls

- The excerpt-include macro needs an excerpt to exist on the named page. The tested page did not exist, so only the error text was observed.
- A hidden excerpt renders as nothing on its own page. Check the other page to see the reuse.
- Atlassian now points to synced blocks for reuse in the Cloud editor. The macro pages mention this at the top.

## Questions and answers

### What are the excerpt parameters?

The documentation lists a name, hidden, and in storage format atlassian-macro-output-type with BLOCK or INLINE. Only hidden was tested.

### How is the source page written?

As an unnamed parameter that holds an ac:link with an ri:page and its content title.

## Related

- [expand macro](https://goingstellar.ro/reference/confluence-storage-format/expand/)
- [toc and toc-zone macros](https://goingstellar.ro/reference/confluence-storage-format/table-of-contents/)
- [anchor macro](https://goingstellar.ro/reference/confluence-storage-format/anchor-macro/)
- [info, note, tip and warning macros](https://goingstellar.ro/reference/confluence-storage-format/info-note-tip-warning/)

## Sources

- [Insert the excerpt macro (Atlassian Support)](https://support.atlassian.com/confluence-cloud/docs/insert-the-excerpt-macro/)
- [Insert the excerpt include macro (Atlassian Support)](https://support.atlassian.com/confluence-cloud/docs/insert-the-excerpt-include-macro/)
- [Insert the include page macro (Atlassian Support)](https://support.atlassian.com/confluence-cloud/docs/insert-the-include-page-macro/)
- [Atlassian Document Format: document structure (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)

