NAME
Statocles::Page::Document - Render document objects into HTML
DESCRIPTION
This page class takes a single document and renders it as HTML.
ATTRIBUTES
document
The document this page will render.
title
The title of the page.
author
The author of the page.
date
Get the date of this page by checking the document.
tags
The tag links for this document. An array of link objects. The most important attributes are:
text - The text of the link
href - The page of the link
METHODS
content
my $html = $page->content( %vars );
Generate the document HTML by processing template directives and converting Markdown. vars
is a set of name-value pairs to give to the template.
vars
my %vars = $page->vars;
Get the template variables for this page.
sections
my @sections = $page->sections;
Get a list of rendered HTML content divided into sections. The Markdown "---" marker divides sections.
tags
my @tags = $page->tags;
Get the list of tags for this page.
template
my $tmpl = $page->template;
The template object for this page. If the document has a template, it will be used. Otherwise, the template attribute will be used.
layout
my $tmpl = $page->layout;
The layout template object for this page. If the document has a layout, it will be used. Otherwise, the layout attribute will be used.