Markdown docs
Show an attached .md file
Attach a README or any .md file to the page, and the macro shows it — always the latest version.
Show a file
- Attach the
.mdfile to the page (••• → Attachments, or drag the file onto the page in the editor). - Add a Markdown macro: type
/markdownand choose Markdown. - In the editor, open the Attached file tab.
- Choose the file from the list of
.mdfiles attached to this page. The preview shows it. - Choose Insert.

If the page has no .md files yet, the tab says so. Attach the file, then open the editor again.
Keep it up to date
Upload a new version of the attachment, with the same file name, and the page shows it straight away. There’s no need to edit the macro.
Confluence search and PDF and Word export use a copy of the file that the macro saves when you choose Insert or Save. To bring search and export up to date after you upload a new version, open the macro and choose Save again.
Images
Images with relative paths load from the same page’s attachments. Attach the images to the page next to the .md file, and refer to them by file name:


Confluence attachments have no folders, so a path like images/logo.png doesn’t find the file. If your Markdown comes from a repository with an images folder, change the paths to the file names. Images with full URLs (https://…) load from their website as usual.
Good to know
- Files with the extensions
.md,.markdown,.mdownand.mkdare listed. - Links to other files of a repository, like
[Setup](docs/setup.md), don’t open anything: only the one file is on the page. - Everyone who can see the page sees the file, the same as the page’s other attachments.