Bootylicious -- one-file blog on Mojo steroids!
$ bootylicious daemon
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.
* filesystem-based storage
* RSS (articles and by tag)
* static pages
* multi-parser support
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" : [
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" : [
- 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" ]).
- 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';
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:
The title may contain dots (".") or dashes ("-") freely.
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.
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.
Bootylicious can be extended by using Mojolicious::Plugin derived third party plugins.
Configuration is done in bootylicious config file. Parameters are passed when loading a plugin.
# Without params (or with default ones)
"plugins" : [
# With params
"plugins" : [
"before_context" : 10
"columns" : 3
See Mojolicious::Plugin documentation for more details and Bootylicious::Plugin::Search as an example plugin.
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.
Mojo Mojolicious Mojolicious::Lite
Breno G. de Oliveira
Johannes 'fish' Ziemke
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.