App-FuguWeb
view release on metacpan or search on metacpan
lib/App/FuguWeb/Check.pod view on Meta::CPAN
out => $dir, # required: the built site
)
=head2 pages, generated_pages
C<pages> names the pages of the description and one page for each
manual. C<generated_pages> names each page that the build writes
itself, which today is the human page of the key directory.
A generated page takes the checks of a page. It takes no reachability
check: a site links the key directory when it chooses to.
Every page that the site must hold, in a stable order: the pages of
the description, then one page for each manual of each group. The full
expectation, assets included, comes from
L<App::FuguWeb::Config/inventory>, so the build and the checks can
never disagree about what the site is.
=head2 run
Check the site and return the problems, each one a sentence that names
the page. An empty list means the site is good.
The checks are:
=over 4
=item *
every expected page and asset exists and is not empty;
=item *
every page has a title;
=item *
every page carries the whole navigation;
=item *
no reference starts with C</>, because the host may serve the site from
a path below the root;
=item *
no reference uses a C<file:> URL;
=item *
every relative reference resolves to a file in the output, a manual
cross-reference included;
=item *
a reference of a page below the root resolves against the directory of
that page;
=item *
every fragment resolves to an C<id> on the target page;
=item *
no relative href reads as a URL scheme, so every local link keeps its
C<./>;
=item *
every page is reachable from the entry page, except a page that the
description marks C<unlinked>;
=item *
the output holds the site and nothing else, at any depth: no staging
directory, no editor backup, no stray source, and no empty
directory.
=back
A description with a C<keys> block adds the checks of
L<App::FuguWeb::Keys/THE CHECKS>. They read the source key directory
and not the output. A stray key file and a stale digest are therefore
found whether or not a build has run.
=head2 external
The external links that the last C<run> collected, sorted.
=head1 SEE ALSO
L<App::FuguWeb>, L<App::FuguWeb::Config>, L<App::FuguWeb::Keys>,
L<App::FuguWeb::Site>, L<fuguweb(1)>
=head1 AUTHOR
Dick Olsson <hi@senzilla.io>
( run in 0.671 second using v1.01-cache-2.11-cpan-364913b4093 )