image

RubyFrontier Documentation

Scalar Directives

A scalar directive is a directive whose value is a “scalar”, a simple datatype such as a string or a number — as opposed to a directive object, which is a file or a folder in your source folder. RubyFrontier gathers scalar directives as part of the same process by which it gathers directive objects: as it begins to operate on a page object, it walks the hierarchy upwards from the page object, gathering directives (to construct the page table).

You can use any scalar directives for any purpose you like; but RubyFrontier also expects and hopes to find certain scalar directives defined for each page object that it renders, and you should be a little careful not to misuse these.

How Scalar Directives Are Supplied

Your source folder supplies scalar directives to RubyFrontier in three places:

image
Figure 1: Example of how scalar directives set in a top-level #prefs.yaml file are overridden through folding.

List of Known Scalar Directives

The following scalar directives are “known” to RubyFrontier: they are meaningful to RubyFrontier out of the box, and will be obeyed if defined.

NOTE on capitalization of known scalar directive names: Frontier’s UserTalk is case-insensitive, but Ruby is not. Accordingly, I have had to pick a capitalization rule. The minimal simplest convention is all-lowercase, and this requires the least effort in migrating from Frontier (conversion to lowercase is a built-in TextMate command).

Pageheader

The pageheader is usually all the HTML up to and including the <body> tag. It can be supplied in any of three different ways; one way is as the value of a :pageheader directive. This directive’s value can be the actual content of the pageheader (a string) or a Pathname for a text file to read and use as the content of the pageheader. The matter is discussed completely here.

Meta tags

The standard way of generating the pageheader involves inserting certain <meta> tags into the <head> region of the document, through the metatags() standard macro. The following directives govern the behavior of this macro:

Title

Body tag attributes

Body tag attributes are mostly superseded by CSS in good HTML practice, but they do still work.

File name rules

If a page object file is a renderable, RubyFrontier uses the page object file’s name to derive the name for the Web page file that will be created. In doing this, it consults certain directives.

Outline objects

Template

Macro processing

Next: The Page Table

This documentation prepared by Matt Neuburg, phd = matt at tidbits dot com (http://www.apeth.net/matt/), using RubyFrontier.
Download RubyFrontier from GitHub.