NAME
Statocles::App::Blog - A blog application
VERSION
version 0.034
DESCRIPTION
This is a simple blog application for Statocles.
FEATURES
Content dividers. By dividing your main content with "---", you create sections. Only the first section will show up on the index page or in RSS feeds.
RSS and Atom syndication feeds.
Tags to organize blog posts. Tags have their own custom feeds so users can subscribe to only those posts they care about.
Crosspost links to redirect users to a syndicated blog. Useful when you participate in many blogs and want to drive traffic to them.
Post-dated blog posts to appear automatically when the date is passed. If a blog post is set in the future, it will not be added to the site when running
build
ordeploy
.In order to ensure that post-dated blogs get added, you may want to run
deploy
in a nightly cron job.
ATTRIBUTES
store
The store to read for documents.
url_root
The URL root of this application. All pages from this app will be under this root. Use this to ensure two apps do not try to write the same path.
page_size
The number of posts to put in a page (the main page and the tag pages). Defaults to 5.
index_tags
Filter the tags shown in the index page. An array of tags prefixed with either a + or a -. By prefixing the tag with a "-", it will be removed from the index, unless a later tag prefixed with a "+" also matches.
By default, all tags are shown on the index page.
So, given a document with tags "foo", and "bar":
index_tags => [ ]; # document will be included
index_tags => [ '-foo' ]; # document will not be included
index_tags => [ '-foo', '+bar' ]; # document will be included
METHODS
command( app_name, args )
Run a command on this app. The app name is used to build the help, so users get exactly what they need to run.
post_pages()
Get the individual post Statocles::Page objects.
index()
Get the index page (a list page) for this application. This includes all the relevant feed pages.
tag_pages()
Get pages for the tags in the blog post documents.
pages()
Get all the pages for this application.
tags()
Get a set of link objects suitable for creating a list of tag links. The common attributes are:
text => 'The tag text'
href => 'The URL to the tag page'
THEME
- blog => index
-
The index page template. Gets the following template variables:
- site
-
The Statocles::Site object.
- pages
-
An array reference containing all the blog post pages. Each page is a hash reference with the following keys:
- content
-
The post content
- title
-
The post title
-
The post author
- blog => post
-
The main post page template. Gets the following template variables:
- site
-
The Statocles::Site object
- content
-
The post content
- title
-
The post title
-
The post author
SEE ALSO
AUTHOR
Doug Bell <preaction@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.