SiteGenerator Demonstration



This page describes how to use the supplied files as a demonstration of SiteGenerator. It assumes that you have a working copy of SiteGenerator installed on your system.

SiteGenerator generates web pages, based on a template, from a series of page fragments. The template should contain a user-defined piece of text (here called a tag), which can be replaced with the body of the text for each page. The user needs to supply the following information:

For more information, please read the Site Generator User Guide, available from www.portaltech.net. For the purposes of this demonstration, the files are in the following locations relative to the directory that this readme.html file is in:

The source files all have the file extension .frag and the 'tag' in each template is 'fragment_link'. The following is a step by step guide to generating pages from these files:

  1. Start SiteGenerator - run the SiteGenerator program by double-clicking on the SiteGenerator.jar file. For more information please refer to the SiteGenerator User Guide.
  2. Set Page Generation Method - ensure that the Page Generation Method is set correctly. Click on the Settings > Page Generation Method menu and click on 'Insert entire page text'. This method allows for a simpler demonstration using plain html files. Refer to the User Guide for more information about using SiteGenerator with other file types such as JSP and JHTML.
  3. Enter the Source Directory - click on the 'Browse' button adjacent to Source Directory. From the File Dialog box that pops up, select the directory which contains the source files. Here it will be '{home}/pages' where {home} is the directory in which this readme.html file resides. Then click 'OK' and the directory that you selected will appear in the Source Directory text field. SiteGenerator will inform you if you make an invalid choice.
  4. Enter the Destination Directory - repeat the above step using the destination directory browse button, and choose the directory where the generated files will go. In this case choose '{home}' where {home} is the directory in which this readme.html file resides. This will ensure that the generated files are in the correct place to find the images that they require.
  5. Enter the Template File - repeat the above step using the template file browse button, and choose the template file that you will be using for this build. Choose one of the template files in '{home}/templates' where {home} is the directory in which this readme.html file resides.
  6. Enter the Tag - enter the identifying text in the template which will be replaced with the fragment text. In this case, enter fragment_link
  7. Enter the Input File Type - enter the file extension of the source files. In this case enter .frag
  8. Enter the Output File Type - enter the file extension of the destination files. In this case enter .html
  9. Start the build - Click on the 'Build Button'. The build will commence. Once it has completed click on the 'OK' button. If you wish to save the setings used so that you can do another build, click on File > Save Settings menu.

Have a look at the generated pages by pointing your browser to {home}/index.html, and navigating through some of the links.

To regenerate the pages using a different template, select a different template file (Step 5). Provided you saved the settings, or have not closed SiteGenerator down, there is no need to re-enter the other settings, as they can remain the same.