NAME

App::FuguWeb::Index - the body of the manual index

SYNOPSIS

use App::FuguWeb::Index;

my $index = App::FuguWeb::Index->new(config => $config);

print $index->body;

DESCRIPTION

The index lists every manual of the site, grouped and described. The groups follow the source directories, which is already how a tree is organized, so the index cannot drift when a manual is added: no list here names one.

The index does not retype a description either. It asks each App::FuguWeb::Manual, and that reads the source.

METHODS

new

App::FuguWeb::Index->new(config => $config)

config is an App::FuguWeb::Config and is required.

title

The title of the index page. It comes from the page block that names the index as its source, so the heading and the browser tab always agree. The build renders the index for such a block only, so the block is always there.

body

The body fragment. App::FuguWeb::Page wraps it, exactly as it wraps a body fragment that a project wrote by hand.

The fragment opens with the title and a paragraph about the manual sources, which names the configured manual host. A manuals.body.html in the source directory replaces that opening: the prose is the project's, and only the project knows what its manuals are.

Each group then emits an <h2> that carries the group anchor, one <dl>, and one blank line. A group with no manual emits nothing, so an empty group leaves no heading behind.

Each manual emits a term and a definition:

<dt><a href="./Fugu::Daemon.3p.html">Fugu::Daemon(3p)</a></dt>
<dd>daemonize a process the OpenBSD way</dd>

The ./ is mandatory. A browser reads a relative URL whose first segment holds a colon as a scheme, so a bare Fugu::Daemon.3p.html would be read as the fugu: protocol.

SEE ALSO

App::FuguWeb, App::FuguWeb::Config, App::FuguWeb::Manual, App::FuguWeb::Page

AUTHOR

Dick Olsson <hi@senzilla.io>