1 [[!template id=plugin name=ymlfront author="[[rubykat]]"]]
6 IkiWiki::Plugin::ymlfront - add YAML-format data to a page
11 add_plugins => [qw{goodstuff ymlfront ....}],
15 This plugin provides a way of adding arbitrary meta-data (data fields) to any
16 page by prefixing the page with a YAML-format document. This provides a way to
17 create per-page structured data, where each page is treated like a record, and
18 the structured data are fields in that record. This can include the meta-data
19 for that page, such as the page title.
21 This plugin is meant to be used in conjunction with the [[field]] plugin.
25 The YAML-format data in a page must be placed at the start of the page
26 and delimited by lines containing precisely three dashes. The "normal"
27 content of the page then follows.
32 title: Foo does not work
38 When running on the Sprongle system, the Foo function returns incorrect data.
40 What will normally be displayed is everything following the second line of dashes.
41 That will be htmlized using the page-type of the page-file.
43 ### Accessing the Data
45 There are three ways to access the data given in the YAML section.
49 The **getfield** plugin can display the data as individual variable values.
54 title: Foo does not work
62 **Urgency:** {{$Urgency}}\\
63 **Status:** {{$Status}}\\
64 **Assigned To:** {{$AssignedTo}}\\
65 **Version:** {{$Version}}
67 When running on the Sprongle system, the Foo function returns incorrect data.
69 * [[ftemplate]] plugin
71 The **ftemplate** plugin is like the [[plugins/template]] plugin, but it is also aware of [[field]] values.
76 title: Foo does not work
82 \[[!ftemplate id="bug_display_template"]]
84 When running on the Sprongle system, the Foo function returns incorrect data.
86 * write your own plugin
88 In conjunction with the [[field]] plugin, you can write your own plugin to access the data.
93 IkiWiki::Plugin::field
98 * browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/ymlfront.pm>
99 * git repo at git://github.com/rubykat/ikiplugins.git