Meta Information Reference

Following is a list of all the meta information items that are used in one way or another by an extension, be it a source handler, a tag or any other extension. Each meta information description follows the same pattern:

  • First the type of the value and an example value are listed.
  • Then the paths for which this item is useful are listed.
  • And at last follows a detailed description.

author

  • String: Thomas Leitner
  • Any

Sets the author of the path. This information is used, for example, by Webgen::SourceHandler::Feed.

author_url

  • String: http://webgen.rubyforge.org
  • Any where author is also set

Sets the homepage of the author of the path. This information is used, for example, by Webgen::SourceHandler::Feed and normally only when author is also set.

blocks

  • Hash of Hashes: {default: {pipeline:textile}, 1: {name: content, pipeline:maruku,erb,tags}}
  • Files in Webgen Page Format

Specifies the default names and additional options for the blocks. The special key default is used to set default options for all blocks. Specific options for (or the name of) a block can be set by using the block index as key (numbering starts from one).

change_freq

  • String: hourly
  • Any

Sets the change frequency of the page. This information is used, for example, by the sitemap source handler. You can use the following values for this key: hourly, daily, weekly, monthly, yearly, never.

created_at

  • Time: 2008-08-14 10:25:34 +02:00
  • Any

Sets the time when the path was created. This information cannot automatically be derived for paths provided by Webgen::Source::FileSystem, so this has to be set manually.

Note that the value needs to be a valid YAML timestamp and needs to include the time part.

draft

  • Boolean: true
  • Any

If this meta information is set on a path, no node will be created from it. This is useful to add content to a website which should only be used later on.

fragments_in_menu

  • Boolean: false
  • Page files

Specifies if the fragment nodes of the page file should be in the menu.

index_path

  • String: myindex.html
  • Directories

Sets the directory index path for the directory overriding the default value.

in_menu

  • Boolean: true
  • Any

Specifies if the path should appear in menus.

kind

  • String: page
  • Any

Specifies the kind of the path. Some source handlers define a default value for this meta information for nodes created by them.

lang

  • String: de
  • Any

Sets the language for the path. Has to be a valid ISO-639-1/2 character code for the language. This meta information needs to be set before a node gets created.

  • Hash: {next: next_doc.html, prev: prev_doc.html}
  • Page files

Specifies additional information, for example, about the position of the page file regarding other files. A sample usage would be to express that the page file is logically followed or preceded by certain page file.

The value needs to be hash and its keys need to be link types except for the special javascript and css keys (which will be discussed below). The link type is used to specify the relation of the page to the linked file. The value can either be a string which is interpreted as a path to the internal or external file; or a hash with arbitrary key-value pairs (use lower case key names) but it should include at least a href key to specify the path to the internal or external file; or an array containing strings or hashes to specify more than one linked file for a given link type.

The special keys javascript and css may have an array of strings or a string as value which are interpreted as path to javascript/CSS files that should be included.

This information is used by ContentProcessor::Head to insert the approriate tags in the head section of an HTML document.

link_attrs

  • Hash: {title: Hallo, class: extra}
  • Any

Specifies additional attribute-value pairs (in form of a Hash) that should be added to a link to the path.

meta

  • Hash: {author: Thomas Leitner, generator: My program}
  • Page files

Specifies names and values for <meta> HTML tags. These key-value pairs are then properly escaped and inserted into the output file by ContentProcessor::Head.

modified_at

  • Time: 2008-08-14 10:25:34 +02:00
  • Any

Sets the time when the path was last modified. This information is automatically set for paths provided by Webgen::Source::FileSystem (the file modification is used) but can be overridden by setting it manually. If not set to a valid time, the time when webgen is executed is used for this meta information.

Note that the value needs to be a valid YAML timestamp and needs to include the time part.

no_output

  • Boolean: true
  • Any

Specifies whether an output path for the node should be written or not. This differs from draft that a node for the path gets created nonetheless.

omit_index_path

  • Boolean: false
  • Index paths

Controls whether the index path should appear in a breadcrumb trail despite the setting of the tag.breadcrumbtrail.omit_index_path option.

output_path_style

  • Array: [:parent, :basename, [., :lang], .html]
  • Any

Sets a custom output path style for the specified path. The basename is substituted for the value :basename and the language for the value :lang. Strings are used verbatim. If :lang is specified in a sub-array, the whole sub-array is omitted, if the configuration option sourcehandler.default_lang_in_output_path is false. For more and detailed information, have look at the output path creation section of the manual!

This meta information has to be set BEFORE a node gets created. Setting this value is therefore only useful, for example, in the paths block of a meta information backing file.

priority

  • Float: 0.5
  • Any

Specifies the priority of this file in respect to all the other files of the website. This information is used, for example, by the sitemap source handler.

routed_title

  • String: Image Directory
  • Any

Only used if set on a directory index path; specifies the title of the directory for which it is the index path. If this meta information is not specified, the title of the directory will be used instead.

sort_info

  • Integer or String: 15
  • Any

Sets the sort information for the path. Any String or Integer value can be used here. When two nodes are compared using this information and both have Integers, then an Integer comparision is done. Otherwise a String comparision is done.

Setting a String value is useful, for example, for specifying dates as sort information.

template

  • String or null: my.template or ~
  • Page/Template files

Sets the template for the page/template file overriding the default value. If set to null (i.e. ~), no template is used for the page/template file!

title

  • String: New Title
  • Any

Sets the title for the path.

used_nodes

  • Array: [*.en.html, test.de.html]
  • Any

The value of this meta information needs to be an array of alcn patterns. All nodes that match at least one of the patterns are considered to be dependencies of the node. Therefore if any of these nodes change, the node will be regenerated, too.