class Documentable::DocPage::Factory

Generator of HTML pages

class Documentable::DocPage::Factory

Generates all HTML pages. If you want to create a new page, you should create it using an instance of this class.

Methods

method config

Defined as

method config(--> Documentable::Config)

Returns the Documentable::Config object used by the factory.

method generate-home-page

Defined as

method generate-home-page(--> Hash)

Returns a Hash in the format:

%(
    document => "HTML string",
    url      => "/index"
)

method generate-error-page

Defined as

method generate-error-page(--> Hash)

Returns a Hash in the format:

%(
    document => "HTML string",
    url      => "/404"
)

method generate-primary

Defined as

method generate-primary(Documentable::Primary $doc --> Hash)

Generates the HTML associated to a Documentable::Primary object. Hash format:

%(
    document => "HTML string",
    url      => "url associated"
)

method generate-secondary

Defined as

method generate-secondary(Kind $kindStr $name --> Hash)

Generates the HTML associated to a bunch of Documentable::Secondary objects. In particular, of all Documentable::Secondary objects with $.name set to $name.

Hash format:

%(
    document => "HTML string",
    url      => "url associated"
)

method generate-index

Defined as

method generate-index(Kind $kind --> Hash)

Generates the HTML index associated to $kind.

Hash format:

%(
    document => "HTML string",
    url      => "url associated"
)

method generate-subindex

Defined as

method generate-subindex(Kind $kindStr $category --> Hash)

Generates the HTML subindex associated to $kind and $category. That means, all Documentable objects with $.categories set to $category.

Hash format:

%(
    document => "HTML string",
    url      => "url associated"
)

Type Graph

Type relations for Documentable::DocPage::Factory
perl6-type-graph Documentable::DocPage::Factory Documentable::DocPage::Factory Any Any Documentable::DocPage::Factory->Any

Expand above chart