How to import multiple html files into Confluence

Sarah Jacob February 9, 2012

Hi there,

I have a whole bunch of html files that I would like to pull into Confluence as part of my new wiki. The html files are not on the internet, they're on my hard disk. I can't see any way to pull them into Confluence. Even the html macro to cut and paste the html doesn't work - Confluence either hangs or comes up with a filepath error. I'm hoping cutting and pasting the content as text is not the only solution since it results in loss of formatting, and given the number of files I have, it's going to be a huge job to fix them up again.

Any advice appreciated!

4 answers

5 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2012

2 other possibilities to help:

  1. Confluence Html Plugin (open source version) can pull your html files out of directory on your server.
  2. Confluence Command Line Interface has support to script importing pages in general. There is also a loadFiles action for some primitive importing of html files.
Jaime Hablutzel October 23, 2014

Confluence CLI "loadFiles" command works well importing the content but I have just figured it embeds HTML content using the "html" macro, any chance to get the content in the Confluence native wiki format?

1 vote
Mikael Mikkola April 13, 2015

Now the above links seem outdated and UWC links lead to Bitbucket (does it have similar properties?).

It would be very nice to be able to import a bunch of www or other html pages so that their internal links would be preserved (even if one would have to afterwards manually edit the looks of the pages). Is there any way to do this?

We have groups that would like to import their own intranets of group pages into wiki, but I know of now other way than to copy-paste them into Confluence, remove every internal link and redo them manually, which is tedious and error-prone.

BTW, if you copy-paste the html page into Word and then copy-paste from Word to Confluence, you are less likely to get in some additional html code that may cause the page look different in the View mode (the links might be 10 - 60 letters away from their place!).

Moreover, if the formulation (such as bullet lists) go broke, maybe it is easier to edit them in Word before copying them into confluence. Sometimes the formulation has been more correct if I open an empty .rtf file in Word before copying into Word instead of copying into .docx mode.

1 vote
Jaime Hablutzel October 22, 2014

Go for "Confluence Command Line Interface" "loadFiles", I have just tested it and it works well, just get sure you have the "html" macro enabled in your Confluence installation (it will be disabled by default if you have migrated from OnDemand).

0 votes
Colin Goudie
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2012

You should try using the UWC (Universal Wiki Converter) I think it has some support for html since pretty much just xml.

https://studio.plugins.atlassian.com/wiki/display/UWC/UWC+Mediawiki+Notes#UWCMediawikiNotes-HtmlConversions

Jaime Hablutzel October 22, 2014

Just tried now with some HTML (not XHTML) and it didn't worked.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events