Revision history for Posy
=========================

0.93 Tue 22 March 2005
----------------------

  * (22 Mar 2005) added user guide
  	Added Posy::UserGuide, which can be accessed using perldoc.

  * (20 Mar 2005) finer grained templating
  	In line with the way that config files are looked for, now
  flavour template files can also be defined on a 'basename' basis
  as well as the old things of chunk, flavour, path and path_type.

  * (20 Mar 2005) body_attrib change
  	Earlier I had special behaviour with the entry "body_attrib" value;
  it would be set to $config_body_attrib if it wasn't set.  However, what
  with the moving around of the parse_entry method, this is no longer
  guaranteed to work, so I removed it; people will have to test explicitly
  for it now.  Easily enough done if using TextTemplate:
  	<body [==($entry_body_attrib ? $entry_body_attrib : $config_body_attrib)==]>

  * (20 Mar 2005) changed error flavour to default flavour
  	It's really rather hostile to the poor user to have an "error"
  flavour; while it may be indicative of an error in the setup, it's
  really rather friendlier to have a default "fallback" flavour -- because
  the site-creator will know that it's an error when they don't get
  what they expect, but the viewer of the site shouldn't be needlessly
  worried when the content is still being displayed and the page
  was still found...

0.92 Wed 09 February 2005
-------------------------

  * (9 Feb 2005) gen_match option for static generation
  	The 'gen_match' option enables one to only generate a subset of
  the site; it will generate only what matches the string.

0.91 Tue 08 February 2005
-------------------------

  * (8 Feb 2005) improvements to static generation
  	I found that when runing posy_static on large numbers of files,
  the memory usage got larger and larger and larger until the whole machine
  ground to a halt.  After trying a few things, I was forced to resort to
  forking a process for each file generation.  Therefore (a) I'm not sure
  how non-unix systems will take this and (b) this could make static generation
  for small sites relatively slower.  But perlfork should hopefully take care
  of the forking, and static generation isn't meant to be as fast as CGI anyway.
  	Also added two more 'gen_type' options:
  	- path: generate one single file, given by the path parameter
  	Useful for updating single files or for checking output.
  	- init: runs the actions without generating any files.
  	Useful for doing the indexing on the whole site first, and then
  running posy_static again to do the actual generation.  It tends to be
  quicker that way.

  * (8 Feb 2005) can set outfile to STDOUT
  	If one gives '-' as the outfile, then this will print to STDOUT.
  This is useful for checking output when using posy_static, where 'outfile'
  is usually set to something else and thus needs to be overridden.

  * (8 Feb 2005) order of parameter parsing in static mode
  	Originally, in static mode, this set the $self->param() parameters
  first from the @ARGV array, and then from the $self->{params} hash,
  which meant that $self->{params} parameters would override @ARGV parameters.
  This was against convention, which expects that things given on the
  command-line (that is, @ARGV) would override things like defaults.
  So I have fixed this so that @ARGV is processed last.  It means, however,
  that the @ARGV processing is done by Posy::Core and then passed on to
  CGI::Minimal, so it is very simple.

  * (8 Feb 2005) fixed bug with static generation

0.90 Sun 06 February 2005
-------------------------

  * (6 Feb 2005) more selective reindexing
    - full reindex is only done (a) if there are no cache data files
      or (b) if the 'reindex' parameter is true.
    - new 'reindex_cat' parameter will force a partial reindex; just of
      the given category.
    - new 'delindex' parameter will force a check for non-existant files
      and delete them from the index.
    - if an entry file is the current request, and it's not in the index
      but it does exist, then will simply add it to the index.

  * (5 Feb 2005) select_by_path renamed to select_entries

  * (5 Feb 2005) added base_dir to posy_one and posy_static

  * (5 Feb 2005) more documentation improvements

  * (5 Feb 2005) entry body change
  	Changed entry processing so that 'render_entry' changes
  $current_entry->{body} rather than making a new $entry_state->{body};
  that way, entry actions can be called to alter the body either before
  or after 'render_entry' has been called. This can be useful for something
  like Posy::Plugin::LinkExtras where one can put "extras" in the links
  to entries from a category index, for example.

  * (4 Feb 2005) added base_dir arg and changed defaults
  	It seemed good to me to put the Posy default data setup
  more in line with the way I was using it myself; that is, having
  a base data directory, with separate directories for data, flavours
  and state.  This has advantages for more than one reason: (a) moving
  directories out of data_dir means they and their contents aren't
  indexed, which saves time; (b) making the flavours and state directories not
  hidden makes them easier to find on Unix and less confusing on MS-Windows.
  So I added a 'base_dir' option and changed the default setup.

  * (4 Feb 2005) improved documentation

  * (4 Feb 2005) tweaks

0.80 Sat 29 January 2005
------------------------

  * (29 Jan 2005) fixed status
  	If Posy is being used as an error-page handler (sometimes
  the only way to get it to work at all with some webbing setups)
  then it needs to return a "Status: 200" for all the OK pages it
  serves, otherwise the status is the unaltered "404 Not Found" status.
  It wasn't doing that before.

0.72 Fri 28 January 2005
------------------------

  * (28 Jan 2005) fix bug in foot_render
  	Not serious bug, but it was rendering the foot when it
  didn't need to, and then being overwritten.

  * (28 Jan 2005) fix bug in parse_path
  	It wasn't parsing 'chrono' paths correctly.

  * (26 Jan 2005) tweaking Changes formatting

0.71 Sat 22 January 2005
------------------------

  * (22 Jan 2005) always set flavour
  	For niceness, for alternative 'process_path_error', always
  set the $self->{path}->{flavour} in 'parse_path'.

0.70 Sat 22 January 2005
------------------------

  * (21 Jan 2005) renamed stop_if_not_found
  	Renamed it to 'process_path_error' since if one is overriding
  it, one might not wish to stop.

  * (21 Jan 2005) removed Makefile.PL

  * (21 Jan 2005) added print_header method
  	The evils of CgiCarp is that it overrides 'render_page' and
  'stop_if_not_found' ungracefully, which means that it can mess up
  other plugins.  Since the reason for it having to override said methods
  is that it has to change the way the web-header is printed (it has
  to turn on warnings) the cleaner way is to make a separate print_header
  method which CgiCarp can override safely.

0.60 Mon 17 January 2005
------------------------

  * (17 Jan 2005) sole entry improvements
  	Improvements to parse_entry, head_render and foot_render, and
  an alteration of the default entry_actions so that when the path-type
  is an entry (that is, there is just one entry) then the head and
  foot rendering will be able to use entry-specific data (such as the
  entry title).  One can also stick meta (or other) tags into ones HTML
  entries and have them preserved -- so long as one sticks the appropriate
  variables in ones flavour templates.

0.50 Sun 16 January 2005
------------------------

  * (16 Jan 2005) changing the entry list
  	Now do_entry_actions doesn't actually destroy the list of
  entries as it goes, but now iterates through the array by index;
  this will make it easier for plugins to do things with the entry
  list, like figuring out previous and next.

0.40 Sat 15 January 2005
------------------------

  * (15 Jan 2005) unbundling the plugins
  	Have moved out all the plugins (except GenStatic) to be in separate
  distributions, to make it easy for folk to pick and choose, and to enable
  proper prerequisites for those plugins that need them.

0.30 Wed 12 January 2005
------------------------

  * (11 Jan 2005) template fix
  	Fix to enable empty templates (it was interpreting that as an
  error and giving the error template instead.

  * (11 Jan 2005) Posy::Plugin::Pod
  	New file type: pod; uses Pod::Simple::HTML.

  * (11 Jan 2005) file-extensions addendum
  	Forgot to put the file_extensions change in EntryTitles.

  * (11 Jan 2005) body attributes
  	Remember the <body> attributes in parse_entry even though
  we don't do anything with them yet.

  * (9 Jan 2005) fix to select_by_path
  	It ran into trouble if there were subdirectories which had
  names which started with the same thing, such as "books" and "bookshelf".
  Now it does a proper equals-or-subdirectory check.

  * (9 Jan 2005) pretty names
  	Added "pretty" names to $self->{path} and $self->{categories}.
  Yes, I couldn't be bothered making it a separate plugin.

  * (9 Jan 2005) file_extensions is hash
  	I changed the file_extensions array to a hash, to make it easier
  for people to have different extensions if they wanted to.  The keys of
  the hash are the extensions, and the values are the "type" of the file.
  The standard types are 'text', 'html' and 'blosxom'.
  	The main problem previously was the collision between .html entry
  file and .html flavour; this would be a problem in cases where there wasn't
  a separate flavour directory; also it was a problem with posy_one if one
  wanted to generate a .html file from a .html file -- much nicer to generate
  a .html file from a .htm or a .my_html file or something of the sort.
  	This is also nicer because people can change extensions without
  having to alter 'parse_entry' -- they could make blosxom files have a .blosxom
  extension, for example.

  * (9 Jan 2005) posy_all tweaks and fixes
  	The untaint stuff for DOCUMENT_ROOT was too restrictive.
  	Also tweaked a bit of documentation.

  * (9 Jan 2005) disabling caching for posy_one
  	Having caching for posy_one only causes trouble (leaving .state
  directories lying around all over the place, reading old .state directories
  and getting wrong data -- a mess).  So I explicitly disable it there,
  and postpone the creation of the state directory until just before
  it's written to.
  	Note that this relies on caching NOT being explicitly enabled
  in the config files.  Since it is enabled by default, there shouldn't
  be any need to explicitly enable it.

  * (8 Jan 2005) LinkList fix
  	Now only give the pre_list/post_list if the list is not empty.

0.21 Fri 07 January 2005
------------------------

  * (7 Jan 2005) twitch
  	Forgot to change Posy::Plugin::AntiSpambot's version.  Drat.

0.20 Fri 07 January 2005
------------------------

  * (7 Jan 2005) you were here
  	Posy::Plugin::Categories category_tree how uses
  HTTP_REFERER to figure out what category you came from, and
  adds a pointer string (default "<-- you were here").
  	This from a suggestion on Nielson's column on how to
  improve Site Maps.  I thought it was a cool idea, so I did it.

  * (7 Jan 2005) tweaked path-type and config
  	Changed the 'top' path-type to 'top_category' to make it clearer.
  Also enhanced the config system so that one can have basename config
  files too; only really useful for entries I guess, but being able to
  set a variable on a per-entry basis can still solve a number of problems.

  * (7 Jan 2005) entry indexing revamp
  	De-did everything to do with entry indexing and path parsing
  to hopefully make it more portable.  I realized I had been falling into
  unixisms with the keys of $self->{files} which meant that the request
  path (which is always forward-slash-unix-style) couldn't always match
  the entry file it wanted on systems which don't use forward slash.
  	There may be other unixisms lurking, but I think I've gotten
  rid of this one.

  * (6 Jan 2005) Posy::Plugin::AntiSpambot
  	Plugin to obscure email addresses to hide them from spambots.

  * (6 Jan 2005) a few tweakings

  * (6 Jan 2005) tweaking posy_one

  * (6 Jan 2005) more documentation improvements

  * (6 Jan 2005) path and category fixes
  	Fixed a bug with path parsing where the path was '/' and there
  was an index entry for it.  Hadn't triggered it before because I'd set
  up my redirect/rewrite differently.
  	Fixed a bug with the category index where the root category
  had inconsistent data.
  	Also added more data to a warning.

0.11 Wed 05 January 2005
------------------------

  * (5 Jan 2005) extra warning message
  	There's a bug happening in Win32 which I can't track down because
  I don't use MS-Windows; I've added an extra warning message which should
  give extra information at the spot where the bug appears to manifest.

  * (5 Jan 2005) fixing test problems
  	One reason for test failures on installation is that the
  modification times of each input data file gets changed to that of
  the release archive.  Which means that testing anything to do with
  chrono stuff is impossible, and any files which have date headers
  in them can't use a whole-file comparison to see if they output
  okay.
  	So now I've scrapped both the chrono tests and the whole-file
  comparisons, and just check to see if some of the expected content
  is in the output test files.  That's still a reasonable test, and
  won't be doomed to failure.

  * (4 Jan 2005) improved documentation

0.10 Mon 03 January 2005
------------------------

  * (3 Jan 2005) another little tweak

  * (3 Jan 2005) some tweaking
  	For some reason I can't fathom, it started reindexing every
  time it ran, and I really noticed the slowdown because I'm trying
  to set up my own site, and I'd converted over enough files that it
  was feeling the pinch (I have a large site).
  	So I've reduced the number of checks in index_entries; the
  fallout will be that manual indexing will be required more often,
  but that's a lot better than it erroniously reindexing every time.

  * (3 Jan 2005) code tweaking
  	Now index_entries sets $self->{reindex}.

  * (3 Jan 2005) fix to Posy::Plugin::BinFile
  	Needed better guestimate of some file types.

  * (3 Jan 2005) Posy::Plugin::LocalDepth

  * (3 Jan 2005) tweaking depth on breadcrumbs

  * (3 Jan 2005) fix problem with entry titles
  	Needed to change EntryTitles and NearLinks for situations where
  the HTML file has an empty title.  Though the obvious answer is to say
  Thou Shalt Not Have Entries Without Titles, the files in question were
  automatically generated ones where I had no control over the titles.

  * (2 Jan 2005) various fixes
     - directories starting with dots should be "other" files, not categories
     - turned on the num_entries limitation
     - other tweaks

  * (1 Jan 2005) Posy::Plugin::LinkExtra and friends
  	LinkExtra is a plugin to add extra info to a link, mainly
  the size of the file linked to.  Added Posy::Plugin::FileStats to
  support this, and altered BinFile to use the FileStats plugin.
  	Also did some more taint stuff and minor fixes.

  * (30 Dec 2004) Posy::Plugin::ThisFlavour
  	Plugin to change relative links to the current flavour.

  * (30 Dec 2004) Text::Template and taint checking
  	Turned on taint checking in the CGI script.  And had to
  fix problems engendered by same.  Not sure if it won't complain
  with the default interpolation, but it works okay with TextTemplate
  now.
  	And while I was altering Text::Template, I made the entry
  delimiters different to the template ones.

  * (30 Dec 2004) Posy::Plugin::BinFile
  	Renders binary files from the data directory.
  Needs File::MMagic module to determine the MIME type of the file.

  * (29 Dec 2004) minor fixes

  * (29 Dec 2004) fixed bug in Posy::Plugin::Dump
  	It was depending on some CGI module stuff that didn't exist
  in CGI::Minimal.

  * (29 Dec 2004) Posy::Plugin::RandQuote
  	Now I have the funky random quotes back!

  * (29 Dec 2004) Posy::Plugin::Canonical
  	This basically corrects non-standard URLs, but it gets confused if it's
  been redirected to.

  * (29 Dec 2004) documentation tweaks

  * (28 Dec 2004) Posy::Plugin::CgiCarp
  	To help with debugging when one can't look at the logs.

  * (28 Dec 2004) workarounds
  	Because I couldn't get Zeus rewrite rules to work, I put in stuff
  to enable posy.cgi to be used as an ErrorDocument 404 (so that all missing
  file requests would be processed by Posy).  This entailed checking for
  an undefined PATH_INFO and using other environment variables instead.
  Not sure if it will work with Zeus yet, but I did get it to work with
  Apache after checking REDIRECT_QUERY_STRING also.
  	Also, put in code into posy_all.cgi so it calculates the directories
  from DOCUMENT_ROOT.

0.05 Fri 24 December 2004
-------------------------

  * (24 Dec 2004) fix in Posy::Plugin::Dump
  	For backwards compatibility with earlier versions of Data::Dumper,
  this now uses the "Dumper()" call, not the extended call.  This should
  be okay, because the dumping is for debugging purposes, not for reading
  things back in.  And it's been failing for someone trying to install
  the system.

0.04 Wed 22 December 2004
-------------------------

  * (22 Dec 2004) a better fix of indexing entries
  	Silly, I should have used File::Spec->abs2rel before.  Am using it now.

  * (22 Dec 2004) corrected error in Changes file

0.03 Wed 22 December 2004
-------------------------

  * (22 Dec 2004) bug fix in indexing entries
  	Got error on CPAN from Win machine in _wanted; not sure exactly
  if this will fix the problem, but the section in question is now less
  unix-centric.

0.02 Mon 20 December 2004
-------------------------

  * (20 Dec 2004) support stuff
  	Forgot to add module names to a config file

  * (16 Dec 2004) action changes
  	Changed the processing of actions (and entry_actions
  and entries) so that it's possible to alter the list while
  actions are running.  Not really sure why this is a good thing,
  but it doesn't seem to hurt to be flexible in this regard.

  * (16 Dec 2004) Posy::Plugin::EntryTitles + Posy::Plugin::NearLinks
  	The NearLinks plugin depends on the EntryTitles plugin.
  I decided to make the EntryTitles a separate plugin because (a)
  it could be nicely used by other plugins such as a Headlines plugin
  (b) it isn't really core functionality.
  	Because EntryTitles has a 'get_title' method, that should
  make it easier for new-file-type plugins to add their own extra
  stuff to get titles if they want.

  * (15 Dec 2004) speed freakage
  	After much profiling, rearranging, adding and deleting,
  I have made Posy faster.  I moved out the 'dump' method into a separate
  plugin, so that Data::Dumper isn't loaded all the time.  I changed
  from using CGI to CGI::Minimal.  This entailed stealing functionality
  from CG::Simple to generate $self->{url} but it seems to work.
  	I removed 'use warnings' -- I'll put it back in when debugging, but
  otherwise it's faster without.

  * (15 Dec 2004) Posy::Plugin::Categories
  	Because I am Prime, I altered Posy::Core to make this easier;
  adding to the categories cache the category basename and the entry-count.
  I'm not doing a cumulative entry-count because (a) I don't want it for
  myself and (b) it's more work.

  * (15 Dec 2004) Toc bugfix
  	Problem if the header had attributes; wasn't done properly.

  * (15 Dec 2004) fix to LinkList
  	It wasn't including the $url in the link, which could mess
  up some people.

  * (14 Dec 2004) speed tweaks
  	Various tweaks to make the code more efficient.  As I suspected,
  Posy::Plugin::Toc was very bad, so I removed the cleverness.  This
  means that one has to make sure that headers in HTML files that
  are going to be indexed by Toc DO NOT have anchors in them,
  because this no longer checks for that.
  	Also added another option to ShortBody so that it can
  replace $entry_body -- this makes things faster when one is
  generating category/chrono indexes which only show the short body,
  since things like Toc won't wastefully process them.
  	I found out that the anchor-in-header thing messed up
  ShortBody's processing of the first header too.

  * (13 Dec 2004) Posy::Plugin::Toc
  	Based on the blosxom 'toc' plugin, but it actually checks
  for existing anchors.  This probably slows it down; oh well.

  * (13 Dec 2004) fix reindex bug
  	This now checks the $self->{path} to see if the current
  request (which would have been found by parse_path or it wouldn't
  have gotten this far) is in the files hash, and if it isn't, then
  it will now reindex (where it didn't before).  Stupid to have to
  manually reindex every time one adds a file when such a thing is
  easily detected.

  * (13 Dec 2004) Posy::Plugin::LinkList
  	This provides a method only; no actions, no replacements.
  Can be called from within flavour files if using Posy::Plugin::TextTemplate.

0.01 Sun 12 December 2004
-------------------------

  * (12 Dec 2004) posy_one
  	Generate one file (not inside the data dir) using Posy.
  It's a hack, and probably needs to be done as a proper overriding
  plugin, but it sort of works.

  * (12 Dec 2004) posy_static and Posy::Plugin::GenStatic
  	Posy::Plugin::GenStatic replaces the "run" method, and
  then runs around in a lot of loops.

  * (12 Dec 2004) changes to posy.cgi
  	Moved posy.cgi out of the scripts directory, since it shouldn't
  be installed like a script.  Also made two versions of it; a vanilla
  version (posy.cgi) which has no plugins, and a full version (posy_all.cgi)
  which has all the plugins, and has debugging enabled.

  * (12 Dec 2004) Posy::Plugin::FlavourMenu

  * (11 Dec 2004) Posy::Plugin::DynamicCss

  * (11 Dec 2004) Posy::Plugin::ThemeCss
  	This sets variables in $flow_state which can then be used
  in flavour templates.

  * (11 Dec 2004) removing redundancies
  	Changed some comments and removed unneeded methods

  * (11 Dec 2004) split append_entry
  	Split the append_entry method into two parts, so that
  future plugins (such as this_flavour) could alter the entry
  after it had been rendered, but before it had been added to the page data.

  * (11 Dec 2004) Posy::Plugin::YamlConfig
  	This was an easy way of enabling configuration values to be hashes,
  which is needed for things like ThemeCss and FlavourMenu.
  	The downside is that it requires one to install YAML, but I'd rather
  have that than have to reinvent the wheel.  And besides, if one uses
  Module::Build one has probably installed YAML anyway.

  * (11 Dec 2004) tweaking documentation

  * (11 Dec 2004) optional testing of dist + plugins
  	Since certain plugins use extra modules (for example, Text::Template
  is used by Posy::Plugin::TextTemplate) then both the Test::Distribution
  test and the plugins tests would fail if those modules weren't installed.
  Therefore these tests now check if those modules are installed, and
  skip themselves if they aren't.
  	This is good because the whole idea of putting certain functionality
  into "standard" plugins is so that the plugins can be optional, and thus
  their dependencies can be optional.

  * (11 Dec 2004) added Posy::Plugin::ShortBody

  * (11 Dec 2004) improved flavour template search
  	Now it looks for an alternative path-type before it looks
  for a template with no path-type.  Alternative path-types are:
  top_entry -> entry, top -> category.

  * (11 Dec 2004) improved reindexing
  	index_entries was always reading the cache even when reindex was
  forced.  Which seemed a bit silly to me.

  * (11 Dec 2004) fix CGI param problem
  	It wasn't reading CGI parameters properly because I'd given
  it keywords and that was all it found.  Probably some subtlety with
  when the "use CGI" command was done.  No matter.  I didn't really
  need those keywords anyway.

  * (11 Dec 2004) added Posy::Plugin::TextToHTML
  	Which uses HTML::TextToHTML module.

  * (10 Dec 2004) a few more tweaks
  	- make select_by_path include anything below the path
  	- made actions and entry_actions explicit in posy.cgi
  	- removed dump from the default actions

  * (10 Dec 2004) added TODO to manifest

  * (10 Dec 2004) more tweaking

  * (10 Dec 2004) tweaking to get tests right

  * (10 Dec 2004) testing TextTemplate plugin
  	Wrote proper tests for TextTemplate plugin.
  Also added some extra stuff to path parsing.

  * (10 Dec 2004) first plugin TextTemplate
  	Had to split Posy into Posy and Posy::Core to get the plugins
  to work; this was because I wasn't really paying attention to the
  plugin implementation of Module::Starter and why Module::Starter itself
  only implemented the "import" method.

  * (9 Dec 2004) fixing up flavours
  	Now the only default flavour is the error flavour.  The problem
  with how it was before, it meant that one couldn't override the default
  'html' flavour with a flavour file.  Much simpler to just have a default
  error flavour; and it isn't really a problem for the user because
  it isn't as if the distro isn't providing a default 'html' flavour,
  it just isn't providing it inside the Posy module itself, it's in
  the flavours directory.
  	Also slightly altered the way the page body data is built up.

  * (9 Dec 2004) getting posy.cgi to work
  	This involved first actually writing posy.cgi, then fixing
  a number of problems, such as with "use lib" and with "content_type"
  and with not finding files, and with various warnings.

  * (9 Dec 2004) changing debug_level from param to init
  	The debug_level is now set at run/new, not while parsing params;
  this is because it is less messy this way, and if you're debugging,
  you would be altering code anyway, so you might as well alter the init code.

  * (9 Dec 2004) updating todo

  * (8 Dec 2004) fix url var
  	Use the CGI url() by default, to pass to templates.

  * (8 Dec 2004) improved config stuff

  * (8 Dec 2004) initial checkin
  	This is a website content manager (and blog) inspired by blosxom.
  I decided to roll my own because there were certain fundamental problems
  with blosxom, and different fundamental problems with Blosxom3.
  This is written for my needs, but others may find it useful.

