WebMake Documentation (version 2.2)

The <out> Tag

The <out> tag is used to generate output. Surprise!

It has one required attribute -- file, which defines the output file generated by this section. In addition it has some optional attributes, as follows:


which is used to substitute in that section's URL address, by inserting it in other sections or out tags in a URL reference, like so: $(out_foo) .

More optional attributes are as follows. These ones also pick up defaults from the <attrdefault> tag.


which defines the format the output is expected in (MIME-style). The default is text/html.


specifies which features of the HTML cleaner to use. The HTML cleaner is a powerful filter which can polish grotty, messy HTML into fully-standards-compliant glory. The default value is all.


Whether this output file should be used as a "main URL" for any content items used within it, to support the url magic metadatum. If you plan to have multiple output styles for your content, be sure to set "ismainurl=false" on the pages which use "alternative" styles. The default value is true.

Perl code can also access out URLs using the get_url() function.

The production of multiple out files that are more-or-less identical can be automated using the <for> tag.

Output and Dependencies

Out files will not be generated if the resulting text has not changed from the previous run, or if the content sections it depends on have not changed.

The latter functionality is accomplished by caching the modification dates of each file from which content was read to generate the output file. If:

  1. the output file exists,

  2. none of the files are newer than they were last time the output file was written,

  3. none of them are newer than the output file itself, and

  4. none of the content items contain dynamic content, such as Perl code or sitemaps,

then it does not need to be rebuilt.

Note: the -r switch to webmake, or the risky_fast_rebuild option to the HTML::WebMake::Main constructor, indicates that WebMake can take some risks when rebuilding. If this is on, then step 4. from the list above is ignored.


  <out name="index" file="index.html">


WebMake Documentation (version 2.2)
Built With WebMake