Export Confluence HTML to Github Wiki
Looking to quickly and easily move your Confluence space to a Github wiki? Then check out this post!
Join the DZone community and get the full member experience.Join For Free
Confluence allows its HTML pages to be exported in a single zip. There is a Confluence-to-Github-Markdown tool that allows automatic export of these HTML files to markdown .md files with a single command from the core directory:
Now you can create separate pages in the GitHub wiki with these md files. However, there are a certain limitations that need to be manually handled to complete the process.
1. Image. GitHub wiki does not support uploading images. Images are posted via URLs in the wiki. Therefore, currently we need to upload the images to a public location and access the URL from there.
2. Metadata. The tool also converts metadata (which is actually good I think) to md. We need to manually remove them wherever unnecessary instead of showing them as plain text in the GitHub wiki.
3. The converter tool creates the name of the md file from the HTML title. If you have " ' " or any special characters in the title of your HTML, it will fail to convert and throw js errors. To fix, change the title header from something such as "Rakshak's RESTful API" to "Rakshak RESTful API" before executing the converter tool.
4. Internal links (links to named anchors in the markdown) are not handled by the converter. The anchors must be manually added.
5. Links to other pages in the confluence wiki are preserved as it is, rather than having them as a relative link. Therefore they need to be replaced by the respective new link in the markdown wiki.
6. Video embedding is not supported in Markdown. Therefore, the converter tool simply ignores any video files embedded in the HTML. To fix this, in the final wiki pages, manually add the videos as a simple HTML links as in, [screencast](https://www.youtube.com/embed/S8juo0Dx68I).
Published at DZone with permission of Pradeeban Kathiravelu, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.