Exporting WWW site

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
 
(15 intermediate revisions by one user not shown)
Line 1: Line 1:
Although topic map is very efficient data and knowledge storage format, it isn't very suitable for human eyes. Stylesheets and templates offer two slightly different methods to publish your topic map in more useful format.
+
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 selecting '''File > Export > Export site'''. Before any file is exported you Wandora requests target directory and template files. Target directory defines local folder where all export files are stored. Export templates are [http://jakarta.apache.org/velocity/index.html Apache Velocity] files you can edit to polish the outlook of exported static site. You can also download subject locator files and resize subject locator image files.
+
Wandora supports template based topic map export. Export starts with a menu option '''File > Export > [[ExportSite|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 [http://jakarta.apache.org/velocity/index.html 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.
 +
 
 +
 
 +
[[Image:export_site.gif|center]]
 +
 
 +
 
 +
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. <!-- Below is an example view to the export folder after  base topic map export.
 +
 
 +
[[Image:export_site_example.gif|center]] -->
 +
 
 +
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 [http://velocity.apache.org/ here].

Latest revision as of 13:13, 6 April 2011

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