diff --git a/basis/furnace/actions/actions-docs.factor b/basis/furnace/actions/actions-docs.factor index 509e0bcdee..dd453ae16d 100644 --- a/basis/furnace/actions/actions-docs.factor +++ b/basis/furnace/actions/actions-docs.factor @@ -19,7 +19,7 @@ HELP: { $description "Creates a new action which serves a Chloe template when servicing a GET request." } ; HELP: action -{ $description "The class of Furnace actions. New instances are created with " { $link } ". 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 } ". New instances of subclasses can be created with " { $link new-action } ". The " { $link page-action } " class is a useful subclass." $nl "Action slots are documented in " { $link "furnace.actions.config" } "." } ; @@ -31,7 +31,7 @@ HELP: new-action { $description "Constructs a subclass of " { $link 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 { $values diff --git a/basis/furnace/boilerplate/boilerplate-docs.factor b/basis/furnace/boilerplate/boilerplate-docs.factor index 5594928082..f8054c8d16 100644 --- a/basis/furnace/boilerplate/boilerplate-docs.factor +++ b/basis/furnace/boilerplate/boilerplate-docs.factor @@ -1,27 +1,37 @@ ! Copyright (C) 2008 Your name. ! 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 HELP: { $values - { "responder" null } - { "boilerplate" null } + { "responder" "a responder" } + { "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 -{ $description "" } ; +{ $class-description "The class of boilerplate responders. Slots are documented in " { $link "furnace.boilerplate.config" } "." } ; -HELP: wrap-boilerplate? -{ $values - { "response" null } - { "?" "a boolean" } -} -{ $description "" } ; +ARTICLE: "furnace.boilerplate.config" "Boilerplate configuration" +"The " { $link boilerplate } " tuple has two slots which can be set:" +{ $table + { { $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." } } +} ; + +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 "" +" [ init-sidebars init-relative-link-prefix ] >>init" +" { wiki \"wiki-common\" } >>template" } ; 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 } +{ $subsection "furnace.boilerplate.config" } +{ $subsection "furnace.boilerplate.example" } +{ $see-also "html.templates.chloe.tags.boilerplate" } ; ABOUT: "furnace.boilerplate"