
By Yamuno Team
03 May 2026
5 min read
Docs-as-code treats documentation like source code: written in plain text, versioned in Git, reviewed in pull requests, and deployed through a CI/CD pipeline. The format is almost always Markdown.
Confluence doesn't fit this model natively. Its export produces HTML or PDF — neither of which belongs in a Git repository. But for many teams, Confluence is where the documentation actually gets written and reviewed. Replacing it isn't always an option.
The practical solution: use Confluence as the editing surface and Git as the source of truth. Export Confluence to Markdown on a cadence, commit the output, and let your pipeline handle the rest.
Markdown Exporter for Confluence is built for exactly this workflow.
docs/ folder (or equivalent)The exporter preserves your Confluence page hierarchy as a folder structure. If your pages are organised logically in Confluence, the output will be organised logically on disk.
A Confluence structure like this:
Documentation (space root)
├── Getting Started
│ ├── Installation
│ └── Quick Start
├── Architecture
│ ├── Overview
│ └── API Reference
└── Operations
└── Runbooks
Becomes this folder structure in the exported ZIP:
docs/
├── Getting Started/
│ ├── Installation.md
│ └── Quick Start.md
├── Architecture/
│ ├── Overview.md
│ └── API Reference.md
└── Operations/
└── Runbooks.md
Most static site generators — MkDocs, Docusaurus, Jekyll, Eleventy — can work directly with this structure.
Consistent filenames matter in a Git repo. If file names change between exports, Git treats the old file as deleted and the new one as added — losing commit history.
Markdown Exporter lets you define a filename pattern using tokens:
| Token | Value |
|---|---|
{title} |
The Confluence page title |
{date} |
Export date in YYYY-MM-DD format |
{id} |
The Confluence page ID |
For a stable docs-as-code workflow, use {title} only — so filenames stay consistent across exports as long as page titles don't change. If you need uniqueness guarantees even when titles change, add {id}.
Most static site generators read metadata from YAML front matter at the top of Markdown files. Enable it in the exporter and configure which fields to include:
---
title: API Reference
author: Platform Team
date: 2026-04-23
space: DOCS
confluence_id: "789012"
---
You can also add custom key-value fields — useful for tagging pages with a category, product, or version that your site generator uses to build navigation or filter content.
Run the export from the Confluence space or page tree you want to publish:
docs/ folder in the repositorygit add docs/ && git commit -m "docs: sync from Confluence 2026-04-23"On the next CI run, your pipeline picks up the updated Markdown and publishes the new docs.
The exported folder structure maps directly to MkDocs nav. A minimal mkdocs.yml:
site_name: Platform Docs
docs_dir: docs
nav:
- Getting Started:
- docs/Getting Started/Installation.md
- docs/Getting Started/Quick Start.md
- Architecture:
- docs/Architecture/Overview.md
- docs/Architecture/API Reference.md
Or let MkDocs auto-generate nav from the folder structure with the awesome-pages plugin.
Place the extracted folder under docs/ in your Docusaurus repo. Docusaurus reads YAML front matter natively — the title and date fields will be picked up automatically. Enable autogenerated sidebars and the folder hierarchy becomes the sidebar structure.
For a lightweight sync loop:
git diff docs/ shows exactly what changed since the last exportFor more frequent syncs, you can automate around the export step using browser automation or Confluence webhooks that trigger a reminder to re-export. The exporter itself is UI-driven and doesn't currently expose a REST API — so fully automated pipelines work best when paired with a scheduler that prompts the export step.
Install Markdown Exporter for Confluence free from the Atlassian Marketplace.
Full documentation at /docs/markdown-exporter-for-confluence.
Questions or feedback? Reach out via our support portal.
Featured App
Convert Between Markdown Files and Confluence Pages Effortlessly
Get product updates and tips straight to your inbox.
No spam, ever.
Confluence doesn't render markdown natively — paste it in and your formatting disappears. Here's how to write markdown directly inside Confluence pages and have it render perfectly.
Read moreWe're proud to share that Yamuno has been named a finalist for the Atlassian Partner of the Year 2026: Marketplace Rising Star Award. Here's what this recognition means to us and the community that made it possible.
Read moreTurn your Confluence space into a fully linked Obsidian vault — with wikilinks, preserved hierarchy, and YAML front matter — without any manual reformatting.
Read more