Exporting WWW site

From WandoraWiki
Jump to: navigation, search

Although topic maps are very efficient to store data and knowledge, they are not very suitable for human eyes. To access topic maps you need Wandora type application or you need to transform topic map into a more accessible format. Stylesheets and templates offer two slightly different methods to publish your topic maps.

Wandora supports template based topic map export. Export starts with a menu option File > Export > Export topic map as series of HTML files.... Before any file is exported Wandora asks for a target directory and template files. Target directory is a local folder where all exported files will be stored. Export templates are Apache Velocity files used to generate HTML documents out of topics. You can also instruct Wandora to download subject locator files and resize subject locator image files.


Export site.gif


After successful export, the target folder contains a set of html files and a log file export.log and possibly files folder with all downloaded subject locator files. Each topic generates one html file. Number of HTML files matches the number of topics. All topic files are named <n>.html where <n> is a hash number of a topic. There are two special files: index.html and starthere.html. Index.html contains a link to every topic in topic map. Starthere.html contains the topic that was currently open in topic panel.

To gain the power of template export, you probably want to edit template files. By default Wandora offers you two templates. These template files are resources/gui/export/sitepage.vhtml and resources/gui/export/siteindex.vhtml. First one is used to generate HTML files for topics and the latter one is used to build index of all generated topics. Templates are Velocity documents. Velocity is a template engine where a target file is generated with simple yet powerful scripting language Velocity Template Language (VTL). Velocity is a subproject of Apache Jakarta. Learn more about the Velocity here.

Personal tools