Contao
This gem will help you to quickly generate an application using Contao CMS which has pre-built support for Sass, Compass, CoffeeScript, Jasmine and Capistrano.
It also feature hashed assets served by the Contao Assets extension, which allows you to have an md5 appended to each of your assets URL on the production site.
The integration with Capistrano allows you to quickly deploy, copy assets, import database and even upload media such as images and PDFs all from the command line using Capistrano.
Pre-requisites
Before installing the gem, you need to make you are running on a Ruby version 1.9.2 or greater as this Gem and most of it's dependencies do not support Ruby 1.8, to check the version you are running, uee the following command:
ruby --version
If you're running a ruby version below 1.9, please install a 1.9 version by following the guide at the Rbenv Installer project.
Installation
Install contao with the following command
gem install contao
Don't forget to run rbenv rehash
if you are using
rbenv as this gem provides
an executable.
Usage
Generating a config file
To start using contao, you need to generate a config file, issue the command
contao generate config
and follow the on-screen instructions.
Generate a new project
Generating a new project is very easy, just use the following command:
contao new /path/to/my_project
This command will generate an application called my\_project
in the
folder /path/to
, the application name is very important as it defaults
to the name of your database, check the Database name
section below for more information.
Initialising the project
Once the project generator has completed, cd into the newsly created project and bootstrap contao by running
bundle exec rake contao:bootstrap
Now visit /contao/install.php
or just visit the website and you should
be redirected to the Installation script, from here on it is the usual
Contao installation procedure, please check Contao's user
guide for
detailed information
Work on the project
To be able to develop with this version of Contao, you first need to understand how it actually works.
TODO: Continue this section
Database name
Locally, the database name is the same as the application name, so if you named your project is named my_project, the database name will be named my_project.
On the server, Capistrano will append the environment on which the deployment occured (check the deployment section below for more information) to the application name, so if your project is named my_project and you are deployment to the staging environment, the database name would default to my_project_staging
Deploying
TODO: Write this section
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Or
Contact
For bugs and feature request, please use Github issues, for other requests, you may use:
Don't forget to follow me on Github and Twitter for news and updates.
License
This code is free to use under the terms of the MIT license.
Copyright (c) 2011 TechnoGate <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.