NAME
Statocles::Site - An entire, configured website
VERSION
version 0.007
SYNOPSIS
my $site = Statocles::Site->new(
title => 'My Site',
nav => [
{ title => 'Home', href => '/' },
{ title => 'Blog', href => '/blog' },
],
apps => {
blog => Statocles::App::Blog->new( ... ),
},
);
$site->deploy;
DESCRIPTION
A Statocles::Site is a collection of applications.
ATTRIBUTES
title
The site title, used in templates.
apps
The applications in this site. Each application has a name that can be used later.
index
The application to use as the site index. The application's individual index() method will be called to get the index page.
nav
The main site navigation. An array of hashes with the following keys:
title - The title of the link
href - The href of the link
build_store
The store object to use for build()
.
deploy_store
The store object to use for deploy()
. Defaults to build_store.
METHODS
app( name )
Get the app with the given name
.
build
Build the site in its build location
deploy
Write each application to its destination.
write( store )
Write the application to the given store.
AUTHOR
Doug Bell <preaction@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 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.