- RUNNING THE APPLICATION
- TECHNOLOGIES USED
- SEE ALSO
- SOURCE REPOSITORY
- COPYRIGHT AND LICENSE
Galileo - A simple modern CMS built on Mojolicious
$ galileo setup $ galileo daemon
Galileo is a Perl CMS with some unusual features. It uses client-side markdown rendering and websockets for saving page data without reloading. Galileo relies on many other great open-source projects, see more in the "TECHNOLOGIES USED" section.
Galileo was an experiment in several technologies, in ways that I had hoped would be interesting. I'm not certain it worked out. Websockets are overused, the ORM is abused in certain ways. I'm not going to officially deprecate it (yet) but I don't encourage new users. I do eventually hope to try my hand at a CMS again, but in the meantime perhaps consider Yancy.
Galileo uses well-tested and widely-used CPAN modules, so installation should be as simple as
$ cpanm Galileo
Although most of Galileo 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.
This is the directory where Galileo expects additional files. These include the configuration file and log files. The default value is the current working directory (
This is the full path to a configuration file. The default is a file named galileo.conf in the
GALILEO_HOMEpath, however this file need not actually exist, defaults may be used instead. This file need not be written by hand, it can be generated as a result of running the
$ 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
GALILEO_CONFIG 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 Galileo 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.
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.
Upgrading database schemas from before Galileo version 0.012 (when schema versioning was introduced) is no longer supported as of version 0.037. The process wasn't testable anyway.
$ galileo dump $ galileo dump --directory pages -t $ galileo dump --directory pages -t --encoding utf-8
This tool dumps all the pages in your galileo site as markdown files. The directory for exporting to may be specifed with the
-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
<h1> level directive pass
-t without an option. Any other option given to
--title will be used as an
sprintf format for rendering the title (at the top of the article).
The document will be encoded as UTF-8 by default, if other encoding of the content is desired, use
-e flag. Available value of the
--encoding is same as Encode module of Perl.
$ galileo daemon
After the database has been setup, you can run
galileo daemon to start the server.
You may also use morbo (Mojolicious' development server) or hypnotoad (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
galileo application. A useful recipe might be
$ hypnotoad `which galileo`
where you may replace
hypnotoad with your server of choice.
Logging in Galileo is the same as in Mojolicious. Messages will be printed to
STDERR unless a directory named log exists in the
GALILEO_HOME path, in which case messages will be logged to a file in that directory.
By default, if Galileo detects a folder named static inside the
GALILEO_HOME 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
extra_static_paths, which expects an array reference of strings representing paths. If any path is relative it will be relative to
By default, if Galileo detects a folder named uploads inside the
GALILEO_HOME 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
upload_path, which expects a string representing the path. If the path is relative it will be relative to
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!
The "config" keys
extra_css key contains the path to a simple theme css file which adds a gray background and border to the main container.
Mojolicious - a next generation web framework for the Perl programming language
DBIx::Class - an extensible and flexible Object/Relational Mapper written in Perl
PageDown (Markdown engine) - the version of Attacklab's Showdown and WMD as used on Stack Overflow and the other Stack Exchange sites
PageDown Extra - Markdown Extra Plugins for Pagedown
Bootstrap - the beautiful CSS/JS library from Twitter
jQuery - because everything uses jQuery
html5sortable - Lightweight jQuery plugin to create sortable lists and grids using native HTML5 drag and drop API
HumaneJS - A simple, modern, browser notification system
Contenticious - File-based Markdown website application
Joel Berger, <firstname.lastname@example.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.