]> gitweb.factorcode.org Git - factor.git/blob - basis/furnace/boilerplate/boilerplate-docs.factor
factor: trim more using lists.
[factor.git] / basis / furnace / boilerplate / boilerplate-docs.factor
1 USING: help.markup help.syntax http.server.dispatchers ;
2 IN: furnace.boilerplate
3
4 HELP: <boilerplate>
5 { $values
6      { "responder" "a responder" }
7      { "boilerplate" "a new boilerplate responder" }
8 }
9 { $description "Wraps a responder in a boilerplate responder. The boilerplate responder needs to be configured before use; see " { $link "furnace.boilerplate.config" } "." } ;
10
11 HELP: boilerplate
12 { $class-description "The class of boilerplate responders. Slots are documented in " { $link "furnace.boilerplate.config" } "." } ;
13
14 ARTICLE: "furnace.boilerplate.config" "Boilerplate configuration"
15 "The " { $link boilerplate } " tuple has two slots which can be set:"
16 { $table
17     { { $slot "template" } { "A pair with shape " { $snippet "{ responder name }" } ", where " { $snippet "responder" } " is a responder class, usually a subclass of " { $link dispatcher } ", and " { $snippet "name" } " is the name of a template file, without the " { $snippet ".xml" } " extension, relative to the directory containing the responder's vocabulary source file." } }
18     { { $slot "init" } { "A quotation run before the boilerplate template is rendered. This quotation can set values which the template can then display." } }
19 } ;
20
21 ARTICLE: "furnace.boilerplate.example" "Boilerplate example"
22 "The " { $vocab-link "webapps.wiki" } " vocabulary uses boilerplate to add a footer and sidebar to every page. Since the footer and sidebar are themselves dynamic content, it sets the " { $slot "init" } " quotation as well as the " { $slot "template" } " slot:"
23 { $code "<boilerplate>"
24 "    [ init-sidebars init-relative-link-prefix ] >>init"
25 "    { wiki \"wiki-common\" } >>template" } ;
26
27 ARTICLE: "furnace.boilerplate" "Furnace boilerplate support"
28 "The " { $vocab-link "furnace.boilerplate" } " vocabulary implements a facility for sharing a common header and footer between different pages on a web site. It builds on top of " { $link "html.templates.boilerplate" } "."
29 { $subsections
30     <boilerplate>
31     "furnace.boilerplate.config"
32     "furnace.boilerplate.example"
33 }
34 { $see-also "html.templates.chloe.tags.boilerplate" } ;
35
36 ABOUT: "furnace.boilerplate"