I thought I'd best make this slightly less lame by allowing links to each
post. Besides, eventually I'm going to want archives, and rss and all that
good stuff that a real blog has. So the following is going to be the basics
underlying all of the above:
sub post : Path('/post') : Args(1) {
my ($self, $c, $pname) = @_;
$pname =~ s/\/\\//g;
my $m = $c->model('Posts');
$c->stash->{post} = $m->slurp($pname);
$c->stash->{pname} = $pname;
$c->stash->{template} = 'post.tt2';
}
So far I've made the decision to just go with flat static html files as the
basis of my posts. Mostly because I really like vi as my editor, and it's
going to end up as html anyway, so I might as well use that for my layout to
begin with, rather than transforming it with some sort of XSLT mungefest. This
may be a poor decision for the future, but since everything is pretty simple
anyway, it will be easy to fix if it turns out to be stupid.