Ignition is a dead simple micro CMS for sites that are too small for WordPress and other CMS software. It takes seconds to set up, and works on just about any website with very little effort. For instance, I use it to quickly convert static websites into client-editable websites on a budget.
Ignition makes use of Redbean, a tiny ORM that automatically handles table creation and object management. The code is included as-is in redbean.php.
Ignition requires PHP 5.3, bcrypt and a database to run, that's it!
Although a fallback function is present, the strings used by Ignition use gettext for easy translation.
- Copy the ignition folder on your website. Its location does not matter, as long as you can include it in your pages.
- Create an empty database in cPanel, phpMyAdmin or a tool of your choice
- Edit the config.sample.php with your database credentials and save it as config.php
- At the very beginning of your page, even before the doctype and PHP code, insert the following tag:
- To insert a block of text, use the following code: . There are other available types such as RawTextBlock (for plain HTML) and ParagraphBlock (converts line breaks to paragraphs).
The name of the block is simply used to identify the block. This also means you can reuse a block at different places on your site.
- Add ?login at the end of your URL to connect. If it's your first time, you will be asked to create a user.
- Once logged in, you will be able to edit your blocks by clicking the "Edit block" link next to them.
- To log out, add ?logout at the end of the URL. Simple, isn't it?
Currently, Ignition offers the following block types:
- RawTextBlock supports raw HTML and doesn't escape tags.
- TextBlock handles plain text, but escapes HTML.
- ParagraphBlock converts double line breaks to paragraphs, and line breaks to
tags.
The default Block class in block.php defines the structure of a typical block. You can define your own by extending existing Block classes, adding features such as rich text editors and even file uploads.
Creating a new block is as simple as extending a class and redefining the required functions. The abstrack Block class under /ignition/blocks/block.php is an example of a working block. Once you are done, you must save your block under the blocks folder with a name ending with .block.php .
The default authentication manager is in the authentication folder. You can easily create your own manager if you prefer to use another database. Simply implement the AuthManager interface and change the current manager in ignition.php.
The templates are located in the /templates folder, and don't use any fancy markup. Considering how light the code is (just under 26kb, not counting Redbean), extending any part of the application should be fairly straightforward.