--- title: Webgen::SourceHandler::Metainfo --- ## Description This source handler provides the ability to set meta information for any path. It uses files in [Webgen Page Format]({relocatable: ../webgen_page_format.html}) which can have two special blocks: * `paths`: This block specifies meta information for paths and therefore this meta information is applied before a node for a path is created. This can be used, for example, to change the output path style. When specifying patterns, remember that the patterns are matched against paths! * `alcn`: This block specifies meta information for nodes and this meta information is applied directly after a node has been created. When specifying patterns, remember that the patterns are matched against absolute localized canonical names! So you always need to take the language part into account, ie. `/index.html` won't match but `/index.en.html`. When no name is specified in the meta information file, the first block is assumed to be the `paths` block and the second block is assumed to be the `alcn` block. The format of the two blocks is the same: they need to be in YAML format and provide a hash with path patterns as keys and the to-be-assigned meta information as values. This is best showed in an example: --- name:paths /**/index.page: output_path_style: [:parent, :cnbase, :ext, [., :lang]] mypic.jpg: in_menu: true --- name:alcn **/index.en.html: in_menu: true All paths named `index.page` are assigned a new output path style. This has to be done in the `paths` block because otherwise it would have no effect. And the file `mypic.jpg` will show up in the menu. Notice, that the first form is specified as an absolute path pattern and the second not. If this meta information file lies in the root directory there is no difference between those two approaches. However, when it lies in a sub directory, the first form is still absolute but the second form is taken relative to the directory in which the meta information file is in. And last but not least, all nodes with a localized canonical name of `index.en.html` will show up in the menu (again, notice that the pattern is relative).