Giter Site home page Giter Site logo

bootylicious's Introduction

=head1 NAME

Bootylicious - Lightweight blog engine on Mojo steroids!

=head1 DESCRIPTION

Bootylicious is a minimalistic blogging application built on top of
L<Mojolicious::Lite>. It is easily extendable with plugins, templates and
themes.

=head2 Features

=over

    * filesystem-based storage
    * comments
    * tags
    * RSS (articles, comments and by tag)
    * static pages
    * drafts
    * archive
    * pingbacks
    * themes
    * multi-parser support (POD, Markdown)
    * plugins
    * Unicode support
    * search

    * lightweight
    * clean code
    * runs everywhere

=back

=head2 Setup

    $ cpan Bootylicious
    $ bootylicious daemon
    Server available at http://*:3000.

=head2 Configuration

Create default configuration file

    $ bootylicious --create-config

Then open C<bootylicious.conf> and change it to fit your
needs. By default C<bootylicious> uses current directory
as working directory. You can change this with C<BOOTYLICIOUS_HOME>
environment variable.

=head2 Writing articles

Articles by default go into C<articles> directory.

Article consists of file information and content with meta data.

=head3 File info

    20101017-article.pod

    or

    20101017T14:02:00-article.pod  or  20101017T140200-article.pod

Where timestamp tells us when the article was created. Modified time is
retrieved automatically from C<mtime>. Filename is the article's permalink url.
Extension is article's format.

=head3 Content

    Title: My first article
    Tags: blog, internet

    Welcome!

    [cut] Read more

    This is my first article. It is in C<pod> format. And I can use all kind of
    B<tags>.

Every article should have metadata. Metadata ends with an empty line.  If there
is a C<[cut]> tag, article will be splitted into C<preview> and C<content>
parts. C<preview> is shown when a) article list is requested, b) rss.

Depending on file format (file extention, remember?) the content is parsed
with an appropriate parser. POD format is available by default. Markdown format
is available when L<Text::Markdown> is installed. Other formats are available as
plugins.

=head2 Enabling/disabling comments

Comments can be disabled everywhere by setting C<comments_enabled> to C<false> in
configuration file:

    {
        ...
        "comments_enabled" : false,
        ...
    }

Or comments can be disabled on per article:

    Title: Article with no comments allowed
    Comments: false

    This is an article...

=head2 Core plugins

=head3 Bootylicious::Plugin::Pingback

Pingbacks as described on L<http://www.hixie.ch/specs/pingback/pingback>.

=head3 Bootylicious::Plugin::HttpCache

ETag header settings and checks.

=head3 Bootylicious::Plugin::CanonicalUrl

All urls that don't have C<.html> in their paths are redirected to C<.html>.

=head3 Bootylicious::Plugin::GoogleAnalytics

Google Analytics JavaScript code.

=head3 Bootylicious::Plugin::Search

Basic search.

bootylicious's People

Contributors

garu avatar greenkakadu avatar marcusramberg avatar memowe avatar olegwtf avatar rswarts avatar snelius30 avatar tmueller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootylicious's Issues

failing tests

Hi! :) I got four failing tests:

book:/tmp/bootylicious memowe$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/*/*.t t/*/*/*.t t/*/*/*/*.t
t/app.t .............................. 4/49 
#   Failed test '200 OK'
#   at t/app.t line 46.
#          got: '404'
#     expected: '200'

#   Failed test 'content is similar'
#   at t/app.t line 46.
#                   '<!doctype html>
#     <head>
#         <meta charset="UTF-8">
#         <title>Not found / Just another blog</title>
#         <link rel="stylesheet" href="/styles.css" type="text/css" />
#         <link href="/styles.css" media="screen" rel="stylesheet" type="text/css" />
#         <link rel="alternate" type="application/rss+xml" title="Just another blog" href="http://localhost:15129/index.rss" />
#         <link rel="alternate" type="application/rss+xml" title="Just another blog Comments" href="http://localhost:15129/comments.rss" />
#         <meta name="generator" content="Bootylicious 1.000000" />
#         <meta content="Not found" name="description" />
#     </head>
#     <body>
#         <div id="body">
#             <div id="header">
#                 <h1 id="title">
#                     <a href="/" rel="home" title="Just another blog">Just another blog</a>
#                     <sup><a href="http://localhost:15129/index.rss"><img src="/rss.png" alt="RSS" /></a></sup>
#                 </h1>
#                 <h2 id="description">I do not know if I need this</h2>
#                 <span id="author">whoami</span>,
#                 <span id="about">Perl hacker</span>
#                 <div id="menu"><a href="/">index</a> <a href="/tags.html">tags</a> <a href="/articles.html">archive</a></div>
#             </div>
#             <div id="content">
#             <div class="error">
#     <h1>404</h1>
#     <br />
#     The page you are looking for was not found
# </div>
# 
#             </div>
#             <div class="push"></div>
#         </div>
#         <div id="footer">Powered by <a href="http://getbootylicious.org">Bootylicious</a></div>
#     </body>
# </html>
# '
#     doesn't match '(?-xism:About me)'
# Looks like you failed 2 tests of 49.
t/app.t .............................. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/49 subtests 
t/model/article-archive.t ............ ok     
t/model/article-by-query-iterator.t .. ok   
t/model/article-by-tag-iterator.t .... ok   
t/model/article-iterator-finder.t .... ok     
t/model/article-pager.t .............. ok     
t/model/article-with-pager.t ......... ok   
t/model/article.t .................... ok     
t/model/comment-iterator-loader.t .... ok   
t/model/comment.t .................... ok   
t/model/document.t ................... ok     
t/model/file-iterator-loader.t ....... ok   
t/model/iterator-searchable.t ........ ok   
t/model/iterator.t ................... ok     
t/model/pingback-iterator-finder.t ... ok   
t/model/pingback-iterator.t .......... ok     
t/model/pingback.t ................... 1/4 
#   Failed test at t/model/pingback.t line 25.
No such file or directory at t/model/pingback.t line 27.
# Looks like you planned 4 tests but ran 3.
# Looks like you failed 1 test of 3 run.
# Looks like your test exited with 2 just after 3.
t/model/pingback.t ................... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/4 subtests 
t/model/tag-cloud.t .................. ok   
t/model/timestamp.t .................. 1/11 
#   Failed test at t/model/timestamp.t line 15.
#          got: 'Do, 01 Jan 1970'
#     expected: 'Thu, 01 Jan 1970'
# Looks like you failed 1 test of 11.
t/model/timestamp.t .................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/11 subtests 
t/plugin/admin.t ..................... ok     
t/plugin/booty-helpers.t ............. ok   
t/plugin/google-analytics.t .......... ok   
t/plugin/http_cache.t ................ ok     
t/plugin/pingback.t .................. ok     

Test Summary Report
-------------------
t/app.t                            (Wstat: 512 Tests: 49 Failed: 2)
  Failed tests:  28-29
  Non-zero exit status: 2
t/model/pingback.t                 (Wstat: 512 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 4 tests but ran 3.
t/model/timestamp.t                (Wstat: 256 Tests: 11 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
Files=24, Tests=320,  8 wallclock secs ( 0.14 usr  0.09 sys +  3.99 cusr  0.51 csys =  4.73 CPU)
Result: FAIL
Failed 3/24 test programs. 4/320 subtests failed.
make: *** [test_dynamic] Error 255

The timestamp fail seems to be a locale problem. No clue how to fix the others. HTH.

lib/Bootylicious.pm missing?

Посмотрел текущую версию и похоже ты забыл добавить в дистрибутив /lib/Bootylicious.pm.
/lib отсутствует

Twitter integration

It would be nice to have twitter integration as a plugin, which tweets the title and a (shortened) URL to every new article. I think there must be some kind of auto detection and a memory which articles are tweeted already.

Or: a simple script tweet.pl which must fired up manually after moving a new article from drafts to articles.

bootylicious.conf option "css" : "screen.css" dont work

daemon output:

Wed Jan 20 04:54:28 2010 error Mojolicious::Plugin::EplRenderer:67 [7930]: Template error in "layouts/wrapper.html.ep": Error around line 19.
17: />
18: % }
19: % foreach my $file (@{config('css')}) {
20:         <link rel="stylesheet" href="/<%= $file %>" type="text/css" />
21: % }
Can't use string ("screen.css") as an ARRAY ref while "strict refs" in use at template line 19.

301 redirect to a canonical URI

.../articles/2009/12/foo.html and .../articles/2009/12/foo are pointing to the same site. It's meant to be a feature but IMHO that's bad for the pagerank and it breakes my Disqus comments because they are associated to the article's URI which isn't unique.

It would be great to have the article accessible under all URIs but get a 301 redirect to "the" canonical URI, whatever it will be.

What do you mean?

Mirko

Articles API

Is it possible to get list of all artilcles and list of all artilcles marked by particular tag in json format ?

No issue, just a question: remove bootylicious from urls

Hi *,

I use bootylicious in my apache as cgi using this directives:

<Files bootylicious>
    SetHandler cgi-script
</Files>

RewriteEngine on

RewriteCond %{REQUEST_URI} !bootylicious
RewriteRule ^(.*)$ bootylicious/$1 [PT,L]

It works great, but the generated URLs begin with bootylicious (like in the RewriteRule), so I get
/bootylicious/articles/2009... instead of /articles/2009... - is there a workaround?

TIA
Mirko :)

redirects make tests fail

$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/*/*.t t/*/*/*.t t/*/*/*/*.t
t/app.t ..... Thu Dec 10 19:35:15 2009 debug main:406 [22314]: Reading configuration from /private/tmp/bootylicious/t/bootylicious.conf.
Thu Dec 10 19:35:15 2009 debug main:433 [22314]: Configuration is not available.
Thu Dec 10 19:35:15 2009 debug Mojolicious:75 [22314]: *** Request for "/". ***
Thu Dec 10 19:35:15 2009 debug MojoX::Dispatcher::Routes:49 [22314]: Dispatching callback.
Thu Dec 10 19:35:15 2009 debug main:174 [22314]: Path is not canonical: 
Thu Dec 10 19:35:15 2009 debug main:175 [22314]: Redirecting to: /.html
Thu Dec 10 19:35:15 2009 debug Mojolicious:128 [22314]: Request took 0.005618 seconds (177.999/s).
t/app.t ..... 1/7 
#   Failed test at t/app.t line 31.
#          got: '302'
#     expected: '200'

#   Failed test at t/app.t line 49.
#          got: '302'
#     expected: '200'

#   Failed test at t/app.t line 50.
#                   ''
#     doesn't match '(?-xism:Archive)'

#   Failed test at t/app.t line 59.
#          got: '302'
#     expected: '200'

#   Failed test at t/app.t line 60.
#                   ''
#     doesn't match '(?-xism:Tags)'
# Looks like you failed 5 tests of 7.
t/app.t ..... Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/7 subtests 
t/paging.t .. Thu Dec 10 19:35:16 2009 debug main:406 [22315]: Reading configuration from /private/tmp/bootylicious/t/bootylicious.conf.
Thu Dec 10 19:35:16 2009 debug main:433 [22315]: Configuration is not available.
Thu Dec 10 19:35:16 2009 debug Mojolicious:75 [22315]: *** Request for "/". ***
Thu Dec 10 19:35:16 2009 debug MojoX::Dispatcher::Routes:49 [22315]: Dispatching callback.
Thu Dec 10 19:35:16 2009 debug main:174 [22315]: Path is not canonical: 
Thu Dec 10 19:35:16 2009 debug main:175 [22315]: Redirecting to: /.html
Thu Dec 10 19:35:16 2009 debug Mojolicious:128 [22315]: Request took 0.005590 seconds (178.891/s).
t/paging.t .. ok     

Test Summary Report
-------------------
t/app.t   (Wstat: 1280 Tests: 7 Failed: 5)
  Failed tests:  2, 4-7
  Non-zero exit status: 5
Files=2, Tests=29,  1 wallclock secs ( 0.04 usr  0.02 sys +  0.69 cusr  0.10 csys =  0.85 CPU)
Result: FAIL
Failed 1/2 test programs. 5/29 subtests failed.
make: *** [test_dynamic] Error 255

Can't load any Bootylicious plugins

$ ./bootylicious get /
Mon Aug 23 06:38:36 2010 debug Mojolicious::Plugin::JsonConfig:86 [16148]: Reading config file "/home/username/tmp/bootylicious.json".
Plugin "gallery" missing, maybe you need to install it?

$ cat bootylicious.json
{ "plugins" : [ "gallery" ] }

$ perl -MBootylicious::Plugin::Gallery -e 1

$ sudo cpan Bootylicious::Plugin::Gallery
[snip]
Bootylicious::Plugin::Gallery is up to date (0.06).

Also tried with the search plugin.

Bootylicious version is from web (0.910102) and Mojolicious is 0.999929

Acticle filename format

In bootylicious manual articles filename format described as:
YYYYMMDD-title.EXTENSION
YYYYMMDDTHH:MM:SS-title.EXTENSION

And it works fine, except getting full article's body via '/articles/:year/:month/:alias'
In first case for any page we get 404 because of line 631:
my $timestamp_re = qr/^$year$month\d\dT.*?-$alias./;

mb better change it for something like qr/^$year$month\d\d.*?-$alias./ ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.