Skip to Content
Atlassian Confluenceacp2mdv1.0.xExtensions & Macros

Supported Extensions & Macros

acp2md converts Atlassian Document Format (ADF) through the Climakers conversion engine. That engine recognises a broad catalogue of Confluence extensions, marketplace-app macros, embeds and media types, and decides element by element whether to render real content fetched from Confluence or to preserve the original element as a safe HTML comment.


How an extension is rendered

Every recognised extension goes through three possible outcomes, in order:

  1. Live API rendering. The --ext-* or --embed-* flag is enabled and the required credentials and context (space key, page ID) are available. The macro is replaced with real content: a Markdown table, a list of resolved pages, a base64 image.
  2. HTML-comment placeholder. The extension is disabled, credentials are missing, or the API call failed. The converter emits a comment such as <!-- Page Tree -->. It is invisible in rendered Markdown but records that a macro existed at that position, so audit and migration workflows stay lossless.
  3. Graceful fallback. For image-style extensions, a failed download falls back to a plain reference — media://UUID or the original Confluence URL — so the document is never broken.

This is why every API-backed extension is safe to leave enabled. When API access is not configured the worst case is an HTML comment, never a runtime error and never a silently missing macro.


What Confluence access each extension needs

Most extensions need API access to resolve content. Configure it once through the config file, environment variables, or persistent flags — see Configuration.

SettingRequired byNotes
confluence.domainAll API-backed extensionse.g. your-tenant.atlassian.net
confluence.usernameAll API-backed extensionsThe email address of the Atlassian account
confluence.api_tokenAll API-backed extensionsCreated at id.atlassian.com
--space-keyRecently Updated, List Labels, Blog Posts, Content by Label, Task ReportFalls back to the macro’s own spaces / spaceKey parameter when present. acp2md converts one page at a time and cannot infer the space, so pass it explicitly when a page uses these macros.
Page ID contextPage Tree, Children, Contributors, Page Signatures, QC PropertiesSupplied automatically by page convert by-id, by-title and by-url

When credentials or context are missing for one extension, only that extension degrades to an HTML comment and a warning is logged. Every other extension on the page continues to render.


Support matrix

The canonical inventory. Flag names are the CLI form accepted by acs2md and acp2md.

Confluence extensionWhat it producesFlagDefaultRequires
Inline images (any URL)Base64 data URIs--embed-imagestrueHTTP access
Confluence media filesBase64 data URIs--embed-media-imagestrueCredentials
Confluence media as sidecarsSidecar files + Markdown image--image-sidecarsfalse (on with --obsidian)Credentials
Non-image attachmentsSidecar files + Markdown linkalways on when credentials presentonCredentials
Draw.io diagramsBase64 PNG--ext-embed-drawio, -DtrueCredentials
Roadmap PlannerBase64 PNG--ext-embed-roadmaptrueCredentials
Table of ContentsMarkdown anchor list--ext-render-toctrue
Recently UpdatedMarkdown bullet list--ext-render-recently-updatedtrueCredentials + space key
List LabelsLinked label badges--ext-render-listlabelstrueCredentials + space key
Page TreeNested Markdown list--ext-render-pagetreetrueCredentials + page ID
ChildrenFlat or nested list--ext-render-childrentrueCredentials + page ID
ContributorsMarkdown list of users--ext-render-contributorstrueCredentials + page ID
Content by LabelMarkdown list of pages--ext-render-content-reporttrueCredentials
Blog PostsMarkdown list of postsresolved automaticallytrueCredentials + space key
Page SignaturesMarkdown table--ext-render-page-signaturestrueCredentials + page ID
QC PropertyResolved value inline--ext-render-qc-propertiestrueCredentials + page ID
QC RevisionResolved value inline--ext-render-qc-propertiestrueCredentials + page ID
Task ReportMarkdown table--ext-render-task-reporttrueCredentials + space key
Content Report TableMarkdown table--ext-render-content-reporttrueCredentials
CQL QueryMarkdown list, or a table when the macro requests columns--ext-render-cql-querytrueCredentials
ExcerptInline body textalways ontrue
AnchorMarkdown anchor targetalways onon
Inline cardsResolved page-title link--ext-resolve-inline-card-titlestrueCredentials
Embed / block cardsResolved Jira, Confluence or YouTube linkresolved automaticallytrueCredentials
Bodied extensions (expand, …)Body content + comment markeralways oncomment on
Inline extensions (status, livesearch, …)HTML comment placeholderalways oncomment on
Other Confluence macrosHTML comment placeholderalways oncomment on
Generic ADF extensionsHTML comment placeholderalways oncomment on
Create from TemplatePlain-text labelalways oncomment on

Reading the defaults. Every --ext-*, --embed-* and --include-* flag ships enabled. Pass --flag=false to opt out for one run, or set the equivalent config key or environment variable to make it permanent.


Images and media

Inline images

--embed-images (default true) downloads every remote image the page references and embeds it as a base64 data URI. The resulting Markdown is self-contained: it does not depend on the Confluence host, a private CDN, or network access at reading time.

Embedded: files with image extensions (.png, .jpg, .jpeg, .gif, .webp, .svg, .bmp, .ico), known image hosts, and any URL whose Content-Type starts with image/.

Skipped on purpose: YouTube and other video URLs, HTML pages, PDFs and other non-image binaries.

Base64 adds roughly 33% to the byte size — the normal cost of a self-contained document.

Confluence-hosted media files

ADF represents uploaded images, avatars and icons as media nodes carrying a UUID and a collection reference like contentId-393325. Without API access those can only render as media://UUID placeholders.

With --embed-media-images on and credentials configured, acp2md extracts the page ID from the collection attribute, calls the attachments API once per page (cached), downloads each matched attachment, and embeds it. A failed download falls back to ![](media://UUID) rather than breaking the document.

Supported formats: PNG, JPEG, GIF, WebP, SVG, BMP, ICO.

Sidecar files instead of base64

--image-sidecars writes the bytes to attachments/<page-id>/<filename> and links them relatively:

![image-20240930-142031.png](attachments/5814878215/image-20240930-142031.png)

The export stays self-contained either way — what changes is line length. See Obsidian Vaults for why a 100 KB single-line data URI stops rendering there but works on GitHub. Failures fall back to base64, then to the remote URL.

Non-image attachments

PDFs, .docx, .xlsx, .pptx, ZIP archives and similar resolve through the same attachments API but render as ordinary Markdown links. The bytes are downloaded once and saved beside the Markdown:

[MBR Conversion User Guide.pdf](attachments/5814878215/MBR%20Conversion%20User%20Guide.pdf) [Quarterly KPI workbook.xlsx](attachments/5814878215/Quarterly%20KPI%20workbook.xlsx)
  • Files land at attachments/<page-id>/<original-filename>, so attachments from many pages share one output directory without colliding.
  • Original filenames are preserved; characters unsafe on Linux, macOS or Windows are replaced with _. Hrefs are percent-encoded, so spaces and parentheses still produce working links.
  • An existing destination file is not re-downloaded — the filesystem acts as the cache.
  • A failed download falls back to the remote Confluence URL with a warning, so output is never broken.

File type is classified by Confluence’s reported media type first, then magic-byte sniffing (PDF, ZIP / Office Open XML, OLE, RTF, 7z, gzip, tar), then the filename extension.

This is the recommended way to package Confluence content for offline review, audit handover, or Git-based archiving: the Markdown and its attachments form one portable bundle.


Diagrams

MacroFlagOutput
Draw.io--ext-embed-drawio, -DBase64 PNG of the rendered diagram
Roadmap Planner--ext-embed-roadmapBase64 PNG of the rendered roadmap

Both need Confluence credentials, because the rendered image is fetched from the tenant rather than reconstructed locally. Both fall back to an HTML comment when they cannot be resolved.


Page-listing macros

MacroFlagOutputNeeds
Page Tree--ext-render-pagetreeNested Markdown list of descendantsPage ID
Children--ext-render-childrenFlat or nested list of child pagesPage ID
Recently Updated--ext-render-recently-updatedBullet list of recently changed pagesSpace key
Blog Postsresolved automaticallyBullet list of postsSpace key
Content by Label--ext-render-content-reportList of pages carrying the labelCredentials
List Labels--ext-render-listlabelsLinked label badgesSpace key

acp2md converts a single page, so it has the page ID but not the space key. Pass --space-key when the page uses Recently Updated, List Labels, Blog Posts or Content by Label — without it those macros degrade to HTML comments.


People, activity and reporting

MacroFlagOutput
Contributors--ext-render-contributorsMarkdown list of contributing users
Task Report--ext-render-task-reportMarkdown table of tasks
Content Report Table--ext-render-content-reportMarkdown table of matching content
CQL Query--ext-render-cql-queryMarkdown list of linked results, or a table when the macro requests columns

Document control and quality

MacroFlagOutput
Page Signatures--ext-render-page-signaturesSignatures table, or a reviewers fallback table
QC Property--ext-render-qc-propertiesThe resolved value, inline
QC Revision--ext-render-qc-propertiesThe resolved value, inline

These resolve template placeholders into the page’s actual metadata, which is what makes a converted controlled document readable outside Confluence.


Cards and embeds

ElementFlagOutput
Inline cards--ext-resolve-inline-card-titlesA link carrying the real page title instead of a bare URL
Embed and block cardsresolved automaticallyHuman-readable Jira, Confluence or YouTube links

Inline card resolution is also what --wikilinks builds on: it needs a real title before it can emit [[Page Title]].


Lossless fallback

Anchors, excerpts, bodied extensions (expand and friends), inline extensions (status, livesearch), and any macro the engine does not specifically support are preserved as HTML comments. Nothing is silently dropped — a migration audit can still find every position where a macro used to be.


Markdown standards compliance

Output is written to satisfy common Markdown linters:

RuleHandling
MD009 no trailing whitespaceStripped; hard breaks preserved
MD012 no multiple blank linesCollapsed
MD022 blank lines around headingsInserted before every block element
MD028 no blank lines between blockquotesMerged
MD031 blank lines around fenced codeInserted before opening fences
MD032 blank lines around listsInserted before every top-level list
MD040 fenced code languageA default language is supplied
MD045 image alt textFalls back to image when ADF provides none
MD047 single trailing newlineEnforced

Extended syntax preserved by GitHub, Obsidian and Pandoc is also emitted: highlight, superscript and subscript, automatic URL linking, per-column GFM table alignment, panels as alerts or callouts (--panel-style), math ($…$ and $$…$$), heading IDs for anchor links, and footnotes.


Caching, size limits and credentials

Several extensions download bytes or issue REST calls. Two settings control how aggressively results are cached:

SettingDefaultUsed by
--image-cache-dir<output-dir>/.image_cache/--embed-images, --embed-media-images, --ext-embed-drawio, --ext-embed-roadmap
--image-max-size-bytes2097152 (2 MB)All embedding flags above — a larger download keeps its original URL instead

Attachment sidecars use the output directory itself as a cache: a file already on disk is not fetched again.

--image-max-size-bytes defaults to 2 MB. Images above that keep their Confluence URL rather than being embedded, which means those specific images need credentials and network access to view. Raise the limit if a fully offline export matters more than output size.

When --sync or --incremental is active, acp2md prints both the state file path and the image cache path before conversion starts, so you can confirm where artefacts will land.


When to disable an extension

SituationWhat to pass
Building a RAG or search index — you want text, not pictures--embed-images=false --embed-media-images=false
Output must stay small and readers have Confluence access anyway--embed-images=false
A macro resolves slowly and you do not need itDisable that specific --ext-render-*
You need the export to be reproducible and API-independentDisable every --ext-render-*; macros become comments
Conversion is rate-limited by macro resolutionDisable the page-listing macros first — they cost the most API calls

Each --ext-render-* costs extra API calls, because the macro is resolved against Confluence rather than read from the page body. On a page dense with macros that dominates the conversion time.


See also

Last updated on