SimpleSite manual

Author: Arjan Scherpenisse
Email: acscherp@wins.uva.nl
Version: 0.50

Abstract

SimpleSite is a set of scripts to generate a complete website out of a data structure (defining the content) and a theme structure defining the look of the generated site. The goal of this is to give the website a consistent look while remaining easily maintainable at the same time. The nice thing is that all html code is generated beforehand, thus effectively eliminating the need of additional scripting facilities like PHP3 or ASP.


1 - Overview

TBD


2 - Understanding properties

2.1 - General

Properties are the building blocks of SimpleSite. They make the difference. A property is a key-value pair. The key is used to reference the property in a theme, and the value is inserted on the place of the reference while parsing.

2.2 - The key-value format

Most SimpleSite properties are specified in property files. These files are for instance all the .item files in sections, but also the content/defaults file.

The format of a property file is quite simple. Every key-value pair is seperated by the parser at the first colon (:) it encounters. For instance, these properties are valid:

title: A simple website
description: This site contains: foo, bar and fubar.

It is possible to include comments in property files. Like in perl and csh scripts, comments start with a #.

# This is comment.
# Everything after the bracket will be ignored.

A property value can be quite lengthy. There's nothing wrong with that. It is possible to make a property value span more than one line. This is done by placing the property value between <-- and -->. Example:

description: <-- This is a multilined
text. There is nothing wrong with that,
if the ending tag is specified
like this -->

That's basically all you need to know to make your own property files.

2.3 - Reseved properties

For some special purposes, the SimpleSite parser generates properties automatically. The automatically generated properties are the following:


3 - The content

3.1 - The site

Every site has data elements that are the same on every page. For instance, the name of the Company or the name of the author of the page. All this global data goes in the content/defaults file. This file, as every data file in SimpleSite, is in the key-value format.

3.2 - Pages

The idea is, that a web site consists of a number of pages. In SimpleSite, each of the pages to be generated is represented by a subdirectory in the content/ directory. Data that is global for the scope of the current page, goes in the content/pagename/defaults file. The data in this file acts the same as the site-wide information in content/defaults, but it is only valid in the scope pagename. In the file you can override the data specified on site level. For instance, if the maintainer of every page on your site is X, but on page Y it is person Z, you can define on site-level X as a page_author, but in the file content/Y/defaults you can put Z's name.

3.3 - Sections

In each sub page, you can define sections. Sections are simple list-like things which allow you to group data. You could have a links page with sections for gaming, one for programming, and so on.

Sections live on your SimpleSite as subdirectories of the page you want them to be in. Additionally, you must explicitly tell the simplesite parser you are using sections. You do this by making a content/pagename/sections file. This file is in the by now well-known key-value format :-)

At section level, you can again specify specific properties belonging only to the current section. They go in the file content/pagename/section/defaults file, as you might have guessed.

3.4 - Section Items

Every section can display a list of items. Items are specified in files in the section directory, in files with .item extensions. Each item defines a set of properties. For instance, when you are making a links page, each item could represent a link. In this case you would specify in the .item files the url of the link, the title of the linked homepage, and maybe a short description. As long as you use one naming convention in both your item files for this page and for the theme, everything should go ok.


4 - Themes

4.1 - General

4.2 - Extra files


Appendix A. Naming conventions

Practically, you can give any property you define a unique name. With SimpleSite however, such a use of properties isnt recommended.

We recommend a property name in the following form:

level_name

For instance, the site level properties could be ones as site_author, site_email and site_title. On item level, they could be item_url, item_title or item_text. This way, you have always a clear view on what properties you are using when creating the look of your site. We also recommend you first make a design on paper on what properties to use, or to use an external GUI SimpleSite editor, for instance nqSiSi.


Arjan Scherpenisse
Last modified: Sun Dec 19 12:42:03 CET 1999