NAME

Dancer2::Plugin::LiteBlog - A minimalist, file-based blog engine for Dancer2.

DESCRIPTION

This Dancer2 plugin provides a lightweight blogging engine. Instead of relying on a database, it utilizes flat files, primarily markdown and YAML, to store and manage content. Through this plugin, Dancer2 applications can seamlessly integrate a blog without the overhead of database management.

SYNOPSIS

First, you need to scaffold Liteblog's assets in your Dancer2 application directory:

$ liteblog-scaffold . 

Then, in your Dancer2 PSGI startup script:

# in your app.psgi 
use Dancer2;
use Dancer2::Plugin::LiteBlog;
liteblog_init();

VERSION

Version 0.02

METHODS

BUILD

At build time, sets up essential configurations for the plugin and initializes the default routes.

Template::Toolkit is forced (all scaffolded views are designed to be TT views). Similarly, views tags are forced to TT's defaults: '[%' and '%]'.

A before_template hook is registered to populate tokens such as settings read from the liteblog config (liteblog entry in Dancer2's config) or the widgets elements (see Dancer2::Plugin::LiteBlog::Widget).

A default GET / route is defined and handles the landing page of the liteblog site.

liteblog_init

A Liteblog app must call this keyword right after having use'ed Dancer2::Plugin::Liteblog. This allows to declare widget-specific routes (defined in the Widget's classes) once the config is fully read by Dancer2 (which is not the case at BUILD time).

AUTHOR

Alexis Sukrieh, <sukria at gmail.com>

BUGS

Please report any bugs or feature requests to bug-dancer2-plugin-liteblog at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dancer2-Plugin-LiteBlog. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Dancer2::Plugin::LiteBlog

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2023 by Alexis Sukrieh.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)