Current version: 2.0
These pages are currently being rewritten pending the release of NextPage 2.0
Some parts of this text may apply to previous versions of NextPage and not the current version.
.
User's Guide - Table of Contents

The project file

Introduction
The project file is a text file holding the group definitions for a project.
These group definitions consist of an opening tag, an arbitrary number of directives (discussed later in this chapter) and a closing tag:

[group = groupname]
...
directives
...
[/group]

The number of groups you can define in the project file is technically unlimited.

The group definitions in the project file correspond with the group tags in the source/template/insert files.

[Pending reconsideration:]
Projects
NextPage uses the term project to denote all aspects (input files, output files, settings etc) belonging to a single project file (mostly this will together make a website).
The name of a project is the name you assign to your project file without the extension.

This implies that you are free to give your project file(s) any name you find appropriate - that is true: you can assign any name and path to project files (although it's recommended to use a descriptive name.

You can create as many project files (= projects) as you wish. That way you can maintain multiple websites with only one installation of NextPage.

Using relative paths
When NextPage is run, it will set its working directory to the directory the project file of the cirrent project resides. That means that whenever you use relative paths in conjunction with NextPage, this path should always be relative to the path to your project file unless stated differently.

Using comments in the project file
Within the project file you can comment out lines by starting these lines with a semi-colon (;). This only works when the semi-colon is found at the beginning ate the line.
Outside group definitions you don't have to use a semi-colon as these lines are ignored by NextPage anyway.

Directives
This is what the project file is about in the first place. Directives are instructions you hand to NextPage in order to tell the program how you want it to process source files. Directives have a name and a value:
directive_name = directive_value

for instance:

sourcePath = c:\root\sources

tells NextPage that (for the group in which the directive was found) the source files should be seeked in "c:\root\sources".

Directives are case sensitive. If you find NextPage not to output files the way you expected it to, check if you didn't neglect this.

Directives categories
Directives can be catagorized in different ways. For instance by their scope, ie the parts of the project file their influence extends. There are directive that have group-wide scope and there are directives with global scope.
Group-wide scope means that the directive works for the group in which it is set only (normally directives do). Global scope means that the value of the directive works for the whole of the project.
The outputDir directive is an example of the first and the log directive (telling NextPage where to write its log to) is an example of the latter.

You can handle directives with global scope equal to those with group-wide scope: just declare them anywhere inside a group definition as you do with any directive. When NextPage encounters the global directive, it will automatically evaluate it as such.
When you declare the same global directive more than once within a project file, NextPage will use the last one it has encountered)

Another way to categorize directives is by their form. That way you can also distinct 2 categories: single and plural directives.
Earlier in this chapter I ststed that directives have the form directive_name = directive_value. Well, that is true for most of them. We could call those single directives.
But some directives have a different form, namely:
directive_name = instance_name:instance_value

Plural directives are directives that may appear more than once within a group, each with their own instance name. Currently, NextPage knows 3 plural directives: insertText, insertFile and replaceText.

In the next directives overview we will catagorize directives in yet another way, ie by their type. This way, we can distinct 4 types:
- path/URL related directives: involve paths and URLs
- meta directives: involve meta data for output HTML pages
- operating directives: directives telling NextPage how to how and where to do its job
- editing directives: These directives modify the contents of the HTML output files

Go to directives overview >>
This page was generated using NextPage 2.0   Edit
User's Guide - Home

Downloading NextPage

Pending NextPage 2.0
Last modified: Saturday, August 10 2002

SourceForge Logo