 |
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:
- The source directory for the page fragments
- The destination directory where the generated pages will be placed
- The location and name of the template file
- The text that is the 'tag' in the template
- The file extension of the source files
- The file extension of the generated files
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:
- source - /pages
- destination - / (this directory)
- templates - /templates (there are a number of supplied templates)
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:
- Start SiteGenerator - run the SiteGenerator program by double-clicking on the
SiteGenerator.jar file. For more information please refer to the SiteGenerator User Guide.
- 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.
- 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.
- 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.
- 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.
- Enter the Tag - enter the identifying text in the template which will be replaced
with the fragment text. In this case, enter fragment_link
- Enter the Input File Type - enter the file extension of the source files. In this case
enter .frag
- Enter the Output File Type - enter the file extension of the destination files. In this case
enter .html
- 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.