Converting Confluence to Markdown
Exporting from Confluence
- Select Space Tools in bottom-left-hand corner
- Select Content Tools from the context menu
- Select the Export tab
- Select the HTML format and click Next
- Select the Custom Export radio button
- Unselect Include comments checkbox
- Select Deselect All shortcut
- Select the articles you do want to export
- Select Export button at the bottom of the page
- ` Exporting Space - In Progress` waiting page
Export complete. Download here
- select here- Extract the above
zip
into your preferred location
Converting with confluence-to-markdown
- Install
pandoc
- Clone this repo:
https://github.com/meridius/confluence-to-markdown
cd
into the folder of the above repoyarn install
project dependenciesyarn run start <pathResource> <pathResult>
, where:pathResource
= File or directory to convert with extracted Confluence exportpathResult
= Destination directory of generated output. Default is CWD
Post-Migration Cleanup and Fixing
- Move articles into folders
- Add
.md
to files in links - Remove no-space-break and other weird characters
- Fix markdown image links to attachments folder
- Remove
<div>
tags - Search for references to Lucidchart diagrams (using the string
vnd.lucid.confluence-onprem
), and download those separately as Visio files, deleting the associated JSON files (which are excessively large) from attachments
Wish list
If output were hosted on Github, it would be nice to rename index.md in every folder to README.md