Reference‎ > ‎


Content file structure and commands

Content files are those that will be inserted into a template and copied to a destination directory. They must have special extension (.src by default) identifying them as a content file (like index.src), may have subextension (like index.home.src) that specifies a non-default template to be used and must have first line reserved for titles and special commands (described below). The rest of content file from line 2 till the end of file replaces a &.text; placeholder in a template or section file thus producing a target file. The name of target file is derived from the name of content file in most cases by simply replacing a .src extension with a .html extension.

See also:     Appendix A: Resolving target filenames for a ruleset of determining target filename, .text placeholder.

Titles in first line are tab-separated (ord(9)) and accessible via .title and .title(n) placeholders. A special command may appear instead of a title if it is preceded by a dot, like .replace(x,y). In this case a corresponding .title(n) is unset and a specified command is executed.

These commands are effective only for the content file being currently processed and do not affect any other content file.

The list of commands is as follows:


the file is forced to be built on each OSB launch. The target file date and time are not compared. Good for pages that contain .ver placeholder to indicate current build version. When the version is changed in ver-file file the new version will appear in the target file on next OSB launch. If the launch only contains forced pages then the version in ver-file is not incremented.

.print (section, string)

prints string in place of all occurrences of section. Commonly not recommended, but may be used to reduce the number of small section files. For example, if we have a _mission.cfg section file with a simple content like <a href="mission.html">Mission</a> in mission.src (to show this section text in bold and remove an unnecessary link) we can just declare .print(mission,<b>Mission</b>) instead of .replace(mission,mission-active) and placing <b>Mission</b> in it.

.replace (section1, section2)

instructs OSB to use another section2 in place of section1. No matter where section1 was declared (template or another section file) it is fully replaced by a section2. section1 and section2 filenames are considered _section1.cfg and _section2.cfg by default and are accessed in current directory.

.replace (.root, string)

changes the value of .root placeholder, allowing the shift of base root. Very effective in cases when a page is relocated and ressources needed (like images) are left untouched. Example use: .replace(.root, to change a value of .root to

.page-alias (alias)

the page name in sitemap file will be replaced by alias. Useful for site home page when we want to replace a page name in the url with a single slash indicating page folder. In this case alias should be empty since the slash is generating automatically.

.page-changefreq (freq)

change frequency of the page for sitemap file. The list of values for freq includes the following values: always, hourly, daily, weekly, monthly, yearly, never. As stated in the sitemap protocol, this value is considered a hint, not a command for search engine crawler.

.page-priority (prio)

the page priority in sitemap file. prio is a float in the range 0.0 to 1.0. Default priority is 0.5.


the file is skipped on each OSB launch. The target file is not modified if it exists.

See also:     Sitemap protocol.