The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bootylicious -- one-file blog on Mojo steroids!

SYNOPSIS

    $ bootylicious daemon

DESCRIPTION

Bootylicious is a minimalistic blogging application built on top of Mojolicious::Lite. You start with just one file, but it is easily extendable when you add new plugins, templates, css files etc.

FEATURES

        * filesystem-based storage
        * tags
        * RSS (articles and by tag)
        * paging
        * static pages
        * drafts
        * themes
        * multi-parser support
        * plugins

CONFIGURATION

Bootylicious can be configured through config file that is placed in the same directory as bootylicious (or set via BOOTYLICIOUS_HOME env variable) file and is called bootylicious.conf. It is in JSON format.

    {
        "title" : "my blog title",
        "descr" : "my blog description",
        "author" : "myname",
        "menu" : [
            "item1", "link1",
            "item2", "link2",
            ...
        ],
        ...
    }

If you are using Bootylicious' default templates, there are a number of configuration options you can set to customize them without ever having to touch html or template files:

  • author - set the blog author's name. Can also be set via the BOOTYLICIOUS_AUTHOR environment variable. Default value is "whoami".

  • about - set the blog author's short description. Can also be set via the BOOTYLICIOUS_ABOUT environment valiable. Default value is "Perl hacker".

  • email - set the blog author's email. Can also be set via the BOOTYLICIOUS_EMAIL environment variable. Default value is "" (empty).

  • title - set the blog title. Can also be set via the BOOTYLICIOUS_TITLE environment variable. Default value is "Just another blog".

  • descr - set the blog's short description (subtitle). Can also be set via the BOOTYLICIOUS_DESCR environment variable. Default value is "I do not know if I need this".

  • menu - set the blog's menu content. Value should be an array, because the order matters:

        "menu" : [
            "item1", "link1",
            "item2", "link2",
            ...
        ],
  • css - loads given css filename from BOOTYLICIOUS_PUBLICDIR/ (see below) and uses it instead of standard bootylicious css. To load more than one css file, in the same given order, just pass an array (e.g.: "css" : [ "foo.css", "bar.css", "baz.css" ]).

  • js - loads given javascript filename from BOOTYLICIOUS_PUBLICDIR/ (see below) and uses it on the templates. To load more than one js file, in the same given order, just pass an array (e.g.: "js" : [ "foo.js", "bar.js", "baz.js" ]).

  • theme - bootylicious can automatically import css and js files via themes. Just put those files under PUBLICDIR/bootylicious/themes/my-theme/ and set this option to "my-theme". Files are loaded in the same order as the filesystem gives them, usually alphabetic.

  • footer - sets each page's footer text, to appear in every page.

Also, the following options can be set to change the way bootylicious behaves:

  • articlesdir - set the dir where articles should be fetched from Can also be set via the BOOTYLICIOUS_ARTICLESDIR environment variable Default value is "articles".

  • publicdir - set the dir where bootylicious looks for static objects, like images, css/js files, etc. Can also be set via the BOOTYLICIOUS_PUBLICDIR environment variable. Default value is "public".

  • templatesdir - set the dir where bootylicious looks for template files, in case you want to override the default ones. Can also be set via the BOOTYLICIOUS_TEMPLATESDIR environment variable. Default value is "templates".

  • pagesdir - set the dir where bootylicious looks for static pages. Default is 'pages'.

  • draftsdir - set the dir where bootylicious looks for draft pages. Default is 'drafts'.

  • cuttag - set the cuttag for parsing the articles. Default is "[cut]".

  • cuttext - set the link to full article view for articles with a cuttag. Default is 'Keep reading'.

  • perl5lib - set any additional lib folders the script should look into before trying to load Perl 5 modules (ideal for integrating with local::lib and use inside shared hosting environments)

  • pagelimit - how many articles to show on index page. Default is 10.

  • meta - html meta tags configuration. Empty by default.

  • template_handler - what template engine to use and what template files to search while rendering pages. Default value is 'ep'.

  • datefmt - date formatting template (strftime). Default value is '%a, %d %b %Y';

FILESYSTEM

ARTICLES

All the articles must be placed under the articlesdir with a name like 20090730-my-new-article.EXTENSION. Based on EXTENSION they are parsed by different parsers. See parsers section for more information.

The filename format must comply with either of the following:

  • YYYYMMDD-title.EXTENSION

  • YYYYMMDDTHH:MM:SS-title.EXTENSION

The title may contain dots (".") or dashes ("-") freely.

PAGES

These are static pages that don't appear on articles page and can be used to show some static information like documentation, download are, author info etc.

DRAFTS

These are future articles that you are working on. Just place your drafts under the draftsdir and keep working. You can look at the preview by pointing your browser to the draft url. Noone is going to see it, because only you know the article's title.

PLUGINS

Bootylicious can be extended by using Mojolicious::Plugin derived third party plugins.

CONFIGURATION

Configuration is done in bootylicious config file. Parameters are passed when loading a plugin.

    # Without params (or with default ones)
    "plugins" : [
        "search",
        "gallery"
    ]

    # With params
    "plugins" : [
        "search", {
            "before_context" : 10
        },
        "gallery", {
            "columns" : 3
        }
    ]

See Mojolicious::Plugin documentation for more details and Bootylicious::Plugin::Search as an example plugin.

TEMPLATES

Embedded templates will work just fine, but when you want to have something more advanced just create a template in templates/ directory with the same name but optionally with a different extension.

For example there is index.html.ep, thus templates/index.html.ep should be created with a new content. If you want to use a different base directory for the templates, set the templatesdir config option as explained above.

SUPPORT

Web

    http://getbootylicious.org/

DEVELOPMENT

Repository

    http://github.com/vti/bootylicious/commits/master

SEE ALSO

Mojo Mojolicious Mojolicious::Lite

CREDITS

Breno G. de Oliveira

Johannes 'fish' Ziemke

Konstantin Kapitanov

Mirko Westermeier

Sebastian Riedel

Slavik Komarov

AUTHOR

Viacheslav Tykhanovskyi, viacheslav.t@gmail.com.

COPYRIGHT

Copyright (C) 2008-2009, Viacheslav Tykhanovskyi.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.