HiD - Static website publishing framework
HÄ«D is a blog-aware, GitHub-friendly, static website generation system inspired by Jekyll.
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.
Categories hash, contains (category, post) pairs
Hashref of command line options to integrate into the config.
(HiD::App::Commands should pass in the $opt
variable to this.)
Hashref of configuration information.
Path to a configuration file.
Hashref of standard configuration options. The default config is:
destination => '_site' ,
include_dir => '_includes',
layout_dir => '_layouts' ,
plugin_dir => '_plugins' ,
posts_dir => '_posts' ,
drafts_dir => '_drafts' ,
source => '.' ,
Directory to write output files into.
N.B.: If it doesn't exist and is needed, it will be created.
Regular expression for which files will be recognized as draft blog posts.
FIXME should this be configurable?
FIXME this and post_file_regex should probably be built based on a common underlying "post_extensions_regex" attr...
String that distinguishes initial excerpt from "below the fold" content
Defaults to "\n\n"
Directory for template "include" files
Hashref of input files. Keys are file paths; values are what type of file the system has classified that path as.
Directory where template files are located.
Hashref of HiD::Layout objects, keyed by layout name.
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.
Array of objects (pages, posts, files) created during site processing.
Regular expression for identifying "page" files.
# FIXME should it be possible to set this from the config?
Arrayref of HiD::Page objects, populated during processing.
Directory for plugins, which will be called after publish.
Plugins, which consume either of the HiD::Plugin or HiD::Generator roles.
Plugins used to subclass HiD::Plugin, but that behavior is deprecated and will be removed on or after 13 Nov 2014.
Regular expression for which files will be recognized as blog posts.
FIXME should this be configurable?
Directory where blog posts are located.
Arrayref of HiD::Post objects, populated during processing.
Slot to hold the HiD::Processor object that will be used during the publication process.
Arguments to use when instantiating the processor attribute.
Can be an arrayref or a hashref.
Defaults to appropriate Template Toolkit arguments.
ArrayRef of HiD::File objects, populated during processing.
Boolean value controlling whether files found in the dest_dir
that weren't
produced by HiD should be removed. In other words, when this is true, after a
hid publish
run, only files produced by HiD will be found in the
dest_dir
.
Defaults to true.
Base directory that all other paths are calculated relative to.
Tags hash, contains (tag, posts) pairs
DateTime object from the start of the latest run of the system.
Cannot be set via argument.
Hashref of files written out during the publishing process.
my $config_key_value = $self->get_config( $config_key_name );
Given a config key name, returns a config key value.
$self->add_input( $input_file => $input_type );
Record what input type a particular input file is.
if( $self->seen_input( $input_file )) { ... }
Check to see if a particular input file has been seen.
my $hid_layout_obj = $self->get_layout_by_name( $name );
Given a layout name (e.g., 'default') returns the corresponding HiD::Layout object.
$self->add_object( $generated_object );
Add an object to the set of objects generated during site processing.
my @objects = $self->all_objects;
Returns the list of all objects that have been generated.
$self->add_written_file( $file => 1 );
Record that a file was written.
my @files = $self->all_written_files;
Return the list of all files that were written out.
if( $self->wrote_file( $file )) { ... }
Check to see if a particular file has been written out.
$self->publish;
Process files and generate output per the active configuration.
- ChinaXing
- reyjrar
John SJ Anderson [email protected]
This software is copyright (c) 2015 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.