=head1 NAME Galileo - A simple modern CMS built on Mojolicious =head1 SYNOPSIS $ galileo setup $ galileo daemon =head1 DESCRIPTION L is a Perl CMS with some modern features. It uses client-side markdown rendering and websockets for saving page data without reloading. L relies on many other great open-source projects, see more in the L section. This release is very young, don't expect anything not to break, for now. Bug reports very welcome. =head1 INSTALLATION L uses well-tested and widely-used CPAN modules, so installation should be as simple as $ cpanm Galileo when using L. Of course you can use your favorite CPAN client or install manually by cloning the L. =head1 SETUP =head2 Environment Although most of L is controlled by a configuration file, a few properties must be set before that file can be read. These properties are controlled by the following environment variables. =over =item C This is the directory where L expects additional files. These include the configuration file and log files. The default value is the current working directory (C). =item C This is the full path to a configuration file. The default is a file named F in the C path, however this file need not actually exist, defaults may be used instead. This file need not be written by hand, it may be generated by the C command. =item C Use L to get additional state information and logger output sent to the browser console. =back =head2 The F command line application L installs a command line application, C. It inherits from the L command and so provides all those commands, but it provides extra functions specifically for use with Galileo. =head3 setup $ galileo setup This command starts the app in setup mode. It can write a configuration file, and setup or upgrade the database. This step is required after both installation and upgrading Galileo, because the database page will deploy or upgrade the database used by your Galileo site. It will use the default DBI settings (SQLite) or whatever is setup in the C configuration file. Warning: As usual, proper care should be taken when upgrading a database. This mechanism is rather new and while it should be safe, the author makes no promises about anything yet! Backup files and database before upgrading! Although L does not need to be configured, it is recommended to do so to set your application's secret. The secret can be any string, however stronger is better. You do not need to memorize it or even remember it. This secret protects the cookies employed by Galileo from being tampered with on the client side. Note that the database deployment tools may emit debugging information unexpectedly to your terminal, especially messages about "overwriting" and some internal "peek" information. These message are harmless, but as yet cannot be suppressed. =head3 dump $ galileo dump $ galileo dump --directory pages -t This tool dumps all the pages in your galileo site as markdown files. The directory for exporting to may be specifed with the C<--directory> or C<-d> flag, by default it exports to the current working directory. The title of the page is by default includes as an HTML comment. To include the title as an C<<

>> level directive pass C<--title> or C<-t> without an option. Any other option given to C<--title> will be used as an C format for rendering the title (at the top of the article). =head1 RUNNING THE APPLICATION $ galileo daemon After the database has been setup, you can run C to start the server. You may also use L (Mojolicious' development server) or L (Mojolicious' production server). You may even use any other server that Mojolicious supports, however for full functionality it must support websockets. When doing so you will need to know the full path to the C application. A useful recipe might be $ hypnotoad `which galileo` where you may replace C with your server of choice. =head2 Logging Logging in L is the same as in L. Messages will be printed to C unless a directory named F exists in the C path, in which case messages will be logged to a file in that directory. =head2 Extra Static Paths By default, if Galileo detects a folder named F inside the C path, that path is added to the list of folders for serving static files. The name of this folder may be changed in the configuration file via the key C, which expects an array reference of strings representing paths. If any path is relative it will be relative to C. =head2 Upload Path By default, if Galileo detects a folder named F inside the C path, that path is used for uploads, specifically user-uploaded images. This path is added to the static files. The name of this folder may be changed in the configuration file via the key C, which expects a string representing the path. If the path is relative it will be relative to C. NOTE: as for this writing, this option doesn't do anything but append to the static files paths. Eventually it will be where uploads go, but NOT YET! =head1 CUSTOMIZING The L keys C and C take array references pointing to CSS or Javascript files (respectively) within a L. As an example, the default C key contains the path to a simple theme css file which adds a gray background and border to the main container. As yet there are no widgets/plugins as such, however a clever bit of javascript might be able to load something. =head1 TECHNOLOGIES USED =over =item * L - a next generation web framework for the Perl programming language =item * L - an extensible and flexible Object/Relational Mapper written in Perl =item * L (Markdown engine) - the version of Attacklab's Showdown and WMD as used on Stack Overflow and the other Stack Exchange sites =item * L - the beautiful CSS/JS library from Twitter =item * L - because everything uses jQuery =item * L - A simple, modern, browser notification system =back =head1 SEE ALSO =over =item * L - File-based Markdown website application =back =head1 SOURCE REPOSITORY L =head1 AUTHOR Joel Berger, Ejoel.a.berger@gmail.comE =head1 COPYRIGHT AND LICENSE Copyright (C) 2012-2013 by Joel Berger This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.