NAME

Statocles::Page - Render documents into HTML

VERSION

version 0.038

DESCRIPTION

A Statocles::Page takes one or more documents and renders them into one or more HTML pages using a main template and a layout template.

ATTRIBUTES

site

The site this page is part of.

app

The application this page came from, so we can give it to the templates.

path

The absolute URL path to save this page to.

last_modified

The last modified date/time of this page. A Time::Piece object.

A hash of arrays of links to pages related to this page. Possible keys:

    feed        - Feed pages related to this page
    alternate   - Alternate versions of this page posted to other sites

Each item in the array is a link object. The most common attributes are:

    text        - The text of the link
    href        - The page for the link
    type        - The MIME type of the link, optional

markdown

The Text::Markdown object to render document Markdown.

template

The main template for this page. The result will be wrapped in the layout template.

layout

The layout template for this page, which will wrap the content generated by the template.

search_change_frequency

How frequently a search engine should check this page for changes. This is used in the sitemap.xml to give hints to search engines.

Should be one of:

    always
    hourly
    daily
    weekly
    monthly
    yearly
    never

Defaults to weekly.

NOTE: This is only a hint to search engines, not a command. Pages marked hourly may be checked less often, and pages marked never may still be checked once in a while. never is mainly used for archived pages or permanent links.

search_priority

How high should this page rank in search results compared to similar pages on this site? This is used in the sitemap.xml to rank individual, full pages more highly than aggregate, list pages.

Value should be between 0.0 and 1.0. The default is 0.5.

This is only used to decide which pages are more important for the search engine to crawl, and which pages within your site should be given to users. It does not improve your rankings compared to other sites. See the sitemap protocol for details.

METHODS

vars

Get extra template variables for this page

render

Render the page, using the template and wrapping with the layout.

links( KEY )

Get the links set for the given key. See the links attribute for some commonly-used keys. Returns a list of link objects.

SEE ALSO

Statocles::Page::Document

A page that renders a single document.

Statocles::Page::List

A page that renders a list of other pages.

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.