SITE Objects in WebLord, the Document Assembly Tool
Logo WebLord v2.2
The Document Assembly Tool

The SITE Object

The SITE object forms the "root", the top-level object for all pages and their objects.

Overview

Define exactly one SITE object
If you define more than one, only the first such object will be available¹ and additional ones are ignored.

The name of the SITE object is (currently) of no significance.
The name may become significant at some point in the future. We suggest 'main' as the name of the SITE object. You are free to use a different name.

The SITE object defines the default set of pages for the site
The default set of pages will be built if you do not name specific pages and you do not indicate that all possible pages are to be built.

Properties defined by the SITE object are inherited by all pages
Property inheritance for pages functions no matter if the pages are defined in the 'pages' property or not.

Properties

Property Name Inherited? Description

post-exec-run never

Optional

Evaluates to a command line that is executed once all pages have been built. This command is only used if the post-exec-batch command is defined.

The reasoning is that post-exec-batch collects specific commands to copy or transfer individual pages, whereas the post-exec-run command provides the framework within which these commands are actually executed: the necessary commands to login to a server before the commands are actually executed.

The following example demonstrates the use of these:

# Define some (global) command-batching and
# command execution properties:
site main
{
	...
	%inheritable post-exec=
		"put " basedir page.objectname ".html "
			page.objectname ".html";
	post-exec-batch = "DoUpload";
	post-exec-run =
		"./upload ftp.myisp.com DoUpload";
	...
}
The ./upload command would is invoked (see post-exec-run just above) with the ISP as the first argument and the DoUpload command batch as the second argument. On a Unix system the ./upload command file might contain something similar to the following:
	#!/bin/bash
	#
	CMDFILE=/tmp/weblord-upload.cmds
	touch				$CMDFILE
	chmod u=rwx,g=,o=		$CMDFILE
	echo "echo 'Uploading...'"	>$CMDFILE
	#echo "username"		>>$CMDFILE
	#echo "password"		>>$CMDFILE
	cat $2				>>$CMDFILE
	echo "close"			>>$CMDFILE
	echo "quit"			>>$CMDFILE
	
	/usr/bin/ftp -i $1 <$CMDFILE


¹ All pages and text objects of the site are "rooted" in this site object, whose properties become available to these objects through inheritance.

This material is Copyright © 1997,1998,1999,2000,2001 RingLord Technologies and Udo Schuermann. All rights reserved. The latest versions of the WebLord software and (this) documentation can be obtained from the WebLord Home Page (the link will only function if you are connected to the internet.)