NAME
HiD - Static website publishing framework
SYNOPSIS
HīD is a blog-aware, GitHub-friendly, static website generation system inspired by Jekyll.
DESCRIPTION
HiD users probably want to look at the documentation for the hid command.
Subsequent documentation in this file describes internal details that are only useful or interesting for people that are trying to modify or extend HiD.
ATTRIBUTES
cli_opts
Hashref of command line options to integrate into the config.
(HiD::App::Commands should pass in the $opt
variable to this.)
config
Hashref of configuration information.
config_file
Path to a configuration file.
default_config
Hashref of standard configuration options. The default config is:
destination => '_site' ,
include_dir => '_includes',
layout_dir => '_layouts' ,
posts_dir => '_posts' ,
source => '.' ,
destination
Directory to write output files into.
N.B.: If it doesn't exist and is needed, it will be created.
include_dir
Directory for template "include" files
inputs
Hashref of input files. Keys are file paths; values are what type of file the system has classified that path as.
layout_dir
Directory where template files are located.
layouts
Hashref of HiD::Layout objects, keyed by layout name.
limit_posts
If set, only this many blog post files will be processed during publishing.
Setting this can significantly speed up publishing for sites with many blog posts.
objects
Array of objects (pages, posts, files) created during site processing.
page_file_regex
Regular expression for identifying "page" files.
# FIXME should it be possible to set this from the config?
pages
Arrayref of HiD::Page objects, populated during processing.
post_file_regex
Regular expression for which files will be recognized as blog posts.
FIXME should this be configurable?
posts_dir
Directory where blog posts are located.
posts
Arrayref of HiD::Post objects, populated during processing.
processor
Slot to hold the HiD::Processor object that will be used during the publication process.
processor_args
Arguments to use when instantiating the processor attribute.
Can be an arrayref or a hashref.
Defaults to appropriate Template Toolkit arguments.
regular_files
ArrayRef of HiD::File objects, populated during processing.
source
Base directory that all other paths are calculated relative to.
written_files
Hashref of files written out during the publishing process.
METHODS
get_config
my $config_key_value = $self->get_config( $config_key_name );
Given a config key name, returns a config key value.
add_input
$self->add_input( $input_file => $input_type );
Record what input type a particular input file is.
seen_input
if( $self->seen_input( $input_file )) { ... }
Check to see if a particular input file has been seen.
get_layout_by_name
my $hid_layout_obj = $self->get_layout_by_name( $name );
Given a layout name (e.g., 'default') returns the corresponding HiD::Layout object.
add_object
$self->add_object( $generated_object );
Add an object to the set of objects generated during site processing.
all_objects
my @objects = $self->all_objects;
Returns the list of all objects that have been generated.
add_written_file
$self->add_written_file( $file => 1 );
Record that a file was written.
all_written_files
my @files = $self->all_written_files;
Return the list of all files that were written out.
wrote_file
if( $self->wrote_file( $file )) { ... }
Check to see if a particular file has been written out.
publish
$self->publish;
Process files and generate output per the active configuration.
SEE ALSO
VERSION
version 0.1
AUTHOR
John SJ Anderson <genehack@genehack.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by John SJ Anderson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.