Take me over?
NAME
Posy::Plugin::GenStatic - Posy plugin for generating static pages.
VERSION
This describes version 0.97 of Posy.
SYNOPSIS
require Posy;
Posy->import(@plugins);
Posy->run(%args);
DESCRIPTION
This plugin replaces the 'run' method in order to generate all known pages of a given type. It replaces the 'get_path_info' helper method. It also provides a new action 'set_outfile', which will automatically be added to the list of actions before 'render_page'.
It expects extra parameters:
- flavours=>\@flavours
-
The flavours to generate. If this is not given, uses the default flavour.
- static_dir=>directory
-
The directory where the static pages are to be put.
- gen_type=>string
-
A comma-separated list of the type of pages to generate.
- init
-
Run the given actions, but produce no output. This is useful for things like setting up the file indexes before doing a full run.
- path
-
Generate one file, given by the path.
- entry
-
Generate all entry files.
- category
-
Generate all category files.
- chrono
-
Generate all chrono files.
- other
-
Copy all "other" non-configuration files from the data dir over to the static dir.
- gen_match=>regex
-
If gen_type is entry,category or chrono, then only generate those files which match.
- verbose=>1
-
Be verbose?
CLASS METHODS
run
Posy->run(%args);
This version of run goes through the file list, creates a "fake" path for the files wanted to generate, and calls the core do_actions for each one.
Flow Action Methods
Methods implementing actions. All such methods expect a reference to a flow-state hash, and generally will update either that hash or the object itself, or both in the course of their running.
set_outfile
Calculates the outfile name from the current path, if $self->{outfile} is not already set. Creates directories if the directories don't already exist.
Helper Methods
Methods which can be called from within other methods.
get_path_info
my $path = $self->get_path_info();
Returns the current "path info" (to be parsed by 'parse_path')
REQUIRES
Posy
Posy::Core
File::Spec
File::Copy
Test::More
SEE ALSO
perl(1). posy_static
BUGS
Please report any bugs or feature requests to the author.
AUTHOR
Kathryn Andersen (RUBYKAT)
perlkat AT katspace dot com
http://www.katspace.com
COPYRIGHT AND LICENCE
Copyright (c) 2004-2005 by Kathryn Andersen
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.