awb Commands

Commands may be used anywhere in an awb source file, but the most common place to use them is in templates. <? and ?> delimit awb commands (like php). The following commands are available:

Global commands

insert siteroot
Inserts the siteroot defined in awb.conf
insert siteroot dots
Inserts parent path dots (such as ../../../ to the root of the site. This is particularly useful for sites that are located in a filesystem rather than being served over http.
insert title
Inserts the title of the AsciiDoc source file that is being processed.
insert meta description html
insert meta description xhtml
These both insert a tag. If specified as xhtml, the closing / is also included. If the document has no description, this command is replaced with nothing (rather than an empty description). In regular documents, the description must be on the fourth line, and that line must start with “//”. This makes it a comment to AsciiDoc, so your description won’t appear in the main text of the page. For galleries, the intro or caption will be used.
insert content
Inserts the content of the page. The meaning of content depends on the template being used, but it follows common sense and really shouldn’t be confusing.
insert breadcrumbs
Inserts a breadcrumb trail as an unordered list, complete with links for previous directories up the hierarchy. Style this with CSS if you want special formatting like a horizontal arrangement.
insert name
Inserts the directory name defined in awbdir.conf
insert user option “option”
Inserts a user-defined option from awbdir.conf. The double-quotes are required.
insert page date “strftime format string”
Inserts the date (file’s mtime) of the page being processed. If the format string is not specified, the default %A, %B %e, %Y (eg. Monday, January 1, 2008) is used.

Blog Commands

insert blog recent
Inserts a list of the most recent blog posts. Note: Using this command would result in rebuilding every post in the blog every time a new post is added.
insert magazine recent
Inserts a list of recent editions of the magazine-like blog. Note: Using this command would result in rebuilding every post in the blog every time a new magazine is added.
insert magazine contents
Inserts a list of all posts belonging to the current magazine.
insert magazine title
Inserts the title of the current magazine.
insert magazine date “strftime format string”
Inserts the date of the current magazine. If the format string is not specified, the default %A, %B %e, %Y (eg. Monday, January 1, 2008) is used.

Gallery Commands

insert room title
Inserts the title of the gallery room, as defined in the .gal.txt file.
insert room intro
Inserts the intro of the gallery room, as defined in the .gal.txt file.
insert room filename
Inserts the filename (without the .gal.txt extension) of the room file. This is useful when you want photos in subdirectories, rather than the same directory as the room file.
insert photo filename
Inserts the filename of the current photo (including the extension).
insert photo title
Inserts the title of the photo.
insert photo caption
Inserts the caption of the photo.