The Script
SiteLite 2.0

The Script File

A Sample ] [ Site part ] [ Page part ] [ Template part ]
Replace part ] [ Collect part ] [ Naming files ] [ Script for this site ]

This file describes the structure of your web site and are the "glue" in the site. You may edit it directly in SiteLite. The script file is a text file that can as well be prepared and edited in any editor that saves your work in plain text.

The script consists of 4 parts:

  • Site part
  • Page part
  • Template part, may be empty
  • Replace part, may be empty
  • Collect part, may be empty

These parts must occur in this order in the script, and:

  • The sequence of the page-lines must reflect the sequence of pages, and blocks, you want in the site.
  • The sequence of replace-lines are executed in the sequence they are given. If you, for some mysterious reason, plan cascading replace effects you should watch this.

A Sample

	// a very simple script for a site with
	// two pages
	VERSION=2.0
	CATALOG=c:\mysite\
	SITENAME=Mini Site
	1,First Page,P,pages\page1.html
	BLOCKS:blocks\src_page1.html
	1,Second Page,P,pages\page2.html
	BLOCKS:blocks\src_page2.html

All blank lines are ignored. Lines that starts with "//" are considered as comments and are ignored by SiteLite.

TopOfPage

Site part

Line Description
VERSION=2.0 Must be exactly as stated so SiteLite 2.0 can appreciate this file as suited for version 2.0 of SiteLite
CATALOG= full path to site catalog on disk
TEMPLATES= full path, site local path or url to catalog with page templates. If the location is on the internet or on another disk volume than the site catalog, the templates are copied to a local catalog: templates.
If the line is omitted, templates is assumed.
If the indicated catalog is empty, SiteLite produces "standard" templates as needed.
RESOURCES= full path, site local path or url to catalog with graphical resources and style sheet. If the location is on the internet or on another disk volume than the site catalog, the resources are copied to a local catalog: gfx.
If the line is omitted, gfx is assumed.
If the indicated catalog is empty, SiteLite produces a minimum set of "standard" resources.
KEYWORDS= comma separated list of keywords for the site, on one line
MESSAGE= any string or html-string. Inserted at bottom of pages.
SITENAME= any string or html-string. Appears as top "banner"
SITEORG= a complete URL to the organisation associated with the site. For instance:
www.hiof.no
SITEAUTHOR= any text, normally a complete reference to the authors home page or a mailto. For instance
<a href="mailto:borre.stenseth@hiof.no">Børre S</a>

TopOfPage

Page part

consists of any number of page lines. All page lines may be followed by any number of block lines and based_on lines. A block-line identifies content files that will be filled into the page, and the based_on-lines are explicit cross references which are independent of the overall hierarchical structure of the site. These cross references will appear below table of content in the left column in the original templates.

In the description below [text], means that the brackets with content may be omitted.

A page line has this form:

indent,name[,type[,location[,author[,msg[,option]]]]]

  • indent is the level in the site hierarchy, 1 is on top. Pages with level 0 is built but will not appear in table of contents etc. Pages with level 0 are typically used as collected pages for print, for frames etc.
  • name is any name for the page. You may use this name as a reference within the site. A name must not contain any of the characters:/:.#\".
  • type identifies the template to use. Predefined types are:
    • P: normal page. This will be the type for the majority of the pages in a site.
    • I: start page. This may be used as a special first page.
    • C: SiteLite will attempt to build a site map on this page.
    • IX: SiteLite will attempt to build a site index on this page.
    • PP: SiteLite will attempt to assemble the content of other pages on this site. For instance to make a printable selection of pages from the site.
    You may use any other text that identifies a template you have defined. If type is omitted or blank, option K is assumed and no template will be requested. See below. There is a set of template types reserved for frame based sites. The types are FT,FL,FF,FT,FP,FC,FIX. See page Templates for a full explanation of templates.
  • location is one of four:
    • a filename relative to site catalog
    • an absolute filename to the same disk volume as the site catalog
    • an absolute filename to another disk volume than the site catalog
    • a complete URL.
    If location is omitted or blank, the name of the page will simply appear as a heading or separator in tables of contents. If the location is an URL or an other disk the page will be imported, copied to the local disk. See page Import for an explanation of import.
  • author is any text, but is normally a complete link, href or mailto. If omitted or blank, the value of the SITEAUTHOR-line is assumed.
  • msg: any string or html-string. Inserted at bottom of pages. If omitted or blank, the value of the SITEMESSAGE-line is assumed.
  • option only two options are recognised at the moment:
    • K: keep this page's body as is. No template, nor any blocks will be involved. Type is meaningless, and is ignored for pages with option K. All tables of contents, collections, replace and indexes are updated for the page.
    • N: Works only when location is a complete URL. No import with copy. No template, nor any blocks will be involved. Type is meaningless, and is ignored for pages with option N. The page is referenced directly in all tables of contents. This option is best suited for sites with frames.
    If you use both K and N, KN, N will be effected.

A block line has this form:

BLOCKS:location[,location]

  • BLOCKS:indicates that this is a list of block files, and that their content will be extracted and inserted into the nearest page above in the script.
  • location is one of four:
    • a filename relative to site catalog
    • an absolute filename to the same disk volume as the site catalog
    • an absolute filename to another disk volume than the site catalog
    • a complete URL.
    If the location is an URL or an other disk the block will be imported, copied to the local disk. See page Import for an explanation of import.

A based-on line has the following form:

BASED_ON:pagename[,pagename]

  • BASED_ON: indicates that this is a cross reference list for the nearest page above in the script.
  • pagename is exactly the name given in the referenced pages page line.

TopOfPage

Template part

is optional and may consist of any number of lines of type:

ATEMPLATE=pagetype,location

  • pagetype: A text that will be used on page lines to identify this template
  • location is one of four:
    • a filename relative to site catalog
    • an absolute filename to the same disk volume as the site catalog
    • an absolute filename to another disk volume than the site catalog
    • a complete URL.
    If the location is an URL or an other disk the template will be imported, copied to the local disk under the catalog templates.

Following types and associated files are predefined:

// common
PP - print_template.html 
B  - block_template.html 

//for noframe sites
P  - nf_p_template.html 
I  - nf_i_template.html 
C  - nf_c_template.html 
IX - nf_ix_template.html 
W  - wrapper_template.html

//for framebased sites
FF - f_f_template.html 
FT - f_t_template.html 
FL - f_l_template.html 
FI - f_i_template.html 
FP - f_p_template.html 
FIX- f_ix_template.html 
FC - f_c_template.html

If you reuse any of the above types you override the default template definition associated with that type. See page Templates for a full description.

TopOfPage

Replace part

is optional an may consist of any number of lines of one of the four following types.

RSIMPLE=sout,sin replaces sout with sin
RDOUBLE=left,right,sin replaces any text between left and right with sin
R1QUOTE=key,sin replaces first quoted text after key with sin
R2QUOTE=key1,key2,sin replaces first quoted text after key2 after key1 with sin

Note that these replaces are done in all published pages as they are generated. They have no effect on the source blocks. If you want to make global changes in your site, including blocks, you may use the general replace tool in SiteLite.

The sin parameter may be any text or it may be the name of a .html or .txt file that will be inserted. If the sin parameter starts with # the rest of the string is interpreted as one of three:

  • an absolute filename.
  • a filename relative to the site catalog
  • an URL

TopOfPage

Collect part

is optional.

Any number of lines of the following type.

COLLECT:name,leftpar,rightpar
  • COLLECT:Tells SiteLite to collect a list of all text enclosed in parentheses leftpar - rightpar.
  • name is the name of the collection. The collected list will be inserted at COLLECTION-elements with this name as a property.
  • leftpar and rightpar may be any text, comments or html.

Any number of lines of the following type.

INDEX:location
  • INDEX:Tells SiteLite to collect a list of keyword occurences.
  • location is the name of the file with a list of keywords, one keyword on each line. The keyword may be followed by any number of synonyms. The lines:
      Hallo,HALLO,HI,Hi,hi
      Welcome,Villkommen,velkommen
      
    is a legal (but not very useful) file-content. The location may be an absolute path, a site local path or an URL.

Naming files

NOTE that all filenames in a script should use backslash (\) as path separator, while all URLs should use forward slash (/). Using a forward slash (/) in a filepath makes SiteLite try to interpret the filename as an URL, sometimes with unpredictable results, and allways with unwanted results.

A filename local to the sitecatalog templates\mytemplate.html
An absolute filename d:\othersite\templates\mytemplate.html
An URL http://www.ia.hiof.no/~borres/gb/templates/mytemplate.html

Script for this site

This SiteLite documentation is made by the following script: SiteLite script File

TopOfPage


Vevsted: B Stenseth
Modul: B Stenseth
Bygget: June 24, 2002
---------------------------