Document furnace.boilerplate
parent
fbf26ca0eb
commit
df38532624
|
@ -19,7 +19,7 @@ HELP: <page-action>
|
||||||
{ $description "Creates a new action which serves a Chloe template when servicing a GET request." } ;
|
{ $description "Creates a new action which serves a Chloe template when servicing a GET request." } ;
|
||||||
|
|
||||||
HELP: action
|
HELP: action
|
||||||
{ $description "The class of Furnace actions. New instances are created with " { $link <action> } ". New instances of subclasses can be created with " { $link new-action } ". The " { $link page-action } " class is a useful subclass."
|
{ $class-description "The class of Furnace actions. New instances are created with " { $link <action> } ". New instances of subclasses can be created with " { $link new-action } ". The " { $link page-action } " class is a useful subclass."
|
||||||
$nl
|
$nl
|
||||||
"Action slots are documented in " { $link "furnace.actions.config" } "." } ;
|
"Action slots are documented in " { $link "furnace.actions.config" } "." } ;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ HELP: new-action
|
||||||
{ $description "Constructs a subclass of " { $link action } "." } ;
|
{ $description "Constructs a subclass of " { $link action } "." } ;
|
||||||
|
|
||||||
HELP: page-action
|
HELP: page-action
|
||||||
{ $description "The class of Chloe page actions. These are actions whose " { $slot "display" } " slot is pre-set to serve the Chloe template stored in the " { $slot "page" } " slot." } ;
|
{ $class-description "The class of Chloe page actions. These are actions whose " { $slot "display" } " slot is pre-set to serve the Chloe template stored in the " { $slot "page" } " slot." } ;
|
||||||
|
|
||||||
HELP: param
|
HELP: param
|
||||||
{ $values
|
{ $values
|
||||||
|
|
|
@ -1,27 +1,37 @@
|
||||||
! Copyright (C) 2008 Your name.
|
! Copyright (C) 2008 Your name.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: help.markup help.syntax io.streams.string ;
|
USING: help.markup help.syntax io.streams.string
|
||||||
|
http.server.dispatchers ;
|
||||||
IN: furnace.boilerplate
|
IN: furnace.boilerplate
|
||||||
|
|
||||||
HELP: <boilerplate>
|
HELP: <boilerplate>
|
||||||
{ $values
|
{ $values
|
||||||
{ "responder" null }
|
{ "responder" "a responder" }
|
||||||
{ "boilerplate" null }
|
{ "boilerplate" "a new boilerplate responder" }
|
||||||
}
|
}
|
||||||
{ $description "" } ;
|
{ $description "Wraps a responder in a boilerplate responder. The boilerplate responder needs to be configured before use; see " { $link "furnace.boilerplate.config" } "." } ;
|
||||||
|
|
||||||
HELP: boilerplate
|
HELP: boilerplate
|
||||||
{ $description "" } ;
|
{ $class-description "The class of boilerplate responders. Slots are documented in " { $link "furnace.boilerplate.config" } "." } ;
|
||||||
|
|
||||||
HELP: wrap-boilerplate?
|
ARTICLE: "furnace.boilerplate.config" "Boilerplate configuration"
|
||||||
{ $values
|
"The " { $link boilerplate } " tuple has two slots which can be set:"
|
||||||
{ "response" null }
|
{ $table
|
||||||
{ "?" "a boolean" }
|
{ { $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." } }
|
||||||
}
|
{ { $slot "init" } { "A quotation run before the boilerplate template is rendered. This quotation can set values which the template can then display." } }
|
||||||
{ $description "" } ;
|
} ;
|
||||||
|
|
||||||
|
ARTICLE: "furnace.boilerplate.example" "Boilerplate example"
|
||||||
|
"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:"
|
||||||
|
{ $code "<boilerplate>"
|
||||||
|
" [ init-sidebars init-relative-link-prefix ] >>init"
|
||||||
|
" { wiki \"wiki-common\" } >>template" } ;
|
||||||
|
|
||||||
ARTICLE: "furnace.boilerplate" "Furnace boilerplate support"
|
ARTICLE: "furnace.boilerplate" "Furnace boilerplate support"
|
||||||
{ $vocab-link "furnace.boilerplate" }
|
"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" } "."
|
||||||
;
|
{ $subsection <boilerplate> }
|
||||||
|
{ $subsection "furnace.boilerplate.config" }
|
||||||
|
{ $subsection "furnace.boilerplate.example" }
|
||||||
|
{ $see-also "html.templates.chloe.tags.boilerplate" } ;
|
||||||
|
|
||||||
ABOUT: "furnace.boilerplate"
|
ABOUT: "furnace.boilerplate"
|
||||||
|
|
Loading…
Reference in New Issue