If you have HTML content that is in multiple files, you may be able to import it by using Paligo's Confluence import feature. The success of the import is dependent on the structure of the HTML.
Note
Select the Confluence (index.html) option. Do not select the HTML import option as that is for single-file HTML imports only.
Important
Paligo can only import valid HTML. We recommend that you test your HTML by using a third-party HTML validator tool such as https://validator.w3.org/.
The import will fail if the HTML is invalid (Paligo recognises the content is invalid and reports "nothing to import").
To import multiple HTML files at once, you need to organize your HTML content in a particular way. You also need to create or edit an "index.html" file so that it contains an unordered list that can act as a table of contents, with links to the various HTML files you are importing.
Note
Ensure that the source files are valid by using validators like Tidy or W3C.
HTML is not a structured format. The import will handle many flavors of HTML, but because of the many proprietary variants there is no guarantee it will work for yours. If you have problems, inquire about the possibilities to tweak the content.
This HTML format only imports one file at a time. To import multiple HTML files, use the "Confluence" import.
If it is not an actual Confluence import, the "index.html" needs to be manually edited to incorporate a ul class="toc"
that contains the publication structure to be imported.
-
First, organize your HTML content like this:
-
Parent "container" folder
-
Index.html
-
Images folder
-
Image files
-
-
CSS folder
-
CSS files
-
-
Content folder
-
HTML files
-
-
It is important that the "container" folder contains one Index.html file at the root level, with all other HTML pages inside a subfolder.
For example:
-
-
Now you need to edit the index.html
file. Use a text editor or code editor to open the file and add this structure to it:<!DOCTYPE html><html> <head> <title>Import</title> </head> <body> <ul class="toc"> <li><a href="enter relative link path here">Link text</a></li> <li><a href="enter relative link path here">Link text</a></li> <li><a href="enter relative link path here">Link text</a></li> <li><a href="enter relative link path here">Link text</a></li> <li><a href="enter relative link path here">Link text</a></li> </ul> </body> </html>
Where:
-
doctype
,html
,head
,title
, andbody
are the basic structure as used in all HTML files. -
ul
defines the start of an unordered list (bullet list) and it has to have the class name "toc". This class is important for the import process and the import will not work correctly without it. -
li
defines a list item -
a href
defines a link. This index.html file needs a list item and link for every html page that you want the import to bring into Paligo. The link needs to be a relative link and should be to an html file that is stored in the "content folder" inside the "container" folder.To learn more about relative links, see w3schools.com/html_filepaths.
-
-
When you have added the links, save the
index.html
file.Tip
We recommend that you use an HTML validator to test your HTML file, such as https://www.html-tidy.org. This will help to identify and potentially fix any structural problems in your HTML before you attempt to import it.
-
Next, use your computer's operating system or a third-party application to make a zip file of the "container" folder.
-
Use the Import Wizard to import the zip file. Select the Confluence format to be able to import multiple files.
If your HTML import does not work, we recommend that you:
-
Validate your HTML content. Paligo will only import correctly formed HTML content.
There are many HTML validation tools you can use, such as https://www.html-tidy.org.
-
Make sure that you have organized the content as described. The arrangement of the files and folders in the zip file that you import is vital to the success of the import.
-
Check that your HTML files use relative references to images and CSS.
Comments
0 comments
Article is closed for comments.