How to use blaze

In our everyday work as a webdesign agency, we do a lot of microsites, product sites and small websites for all sorts of customers. All those projects have in common that the widely used and really good frameworks (like Symfony or Laravel) and also most of the content management systems (like ghost or wordpress) are total overkill. blaze is not. Using it is easy and a lot of optimization and the backend including most of the configuration options will work with few clicks. Using blaze in your code is also very easy.

Usage of the backend

After the installation, the backend is available and ready to be used. If you do want to access the backend at any point, just navigate to the folder blaze or to the login path you setup in the interface section of the backend.

In the backend, you will find nearly all configuration options you may use. The configuration is fine tuned and there are tooltips to give you a basic idea of what the configuration buttons do. If you want to dig deeper into the configuration, we recommend the documentation of the configuration.

The backend itself should be self explanatory.

Using blaze in your code

Within your scripts, you may at any point use the php object $blaze. It holds a lot of components which are explained in the components section.

To give you a first idea of what the usage of blaze might look like, here is a basic index.php example for the webroot.

    <?php
        // Add assets
        $blaze->assets->add('/less/myasset.less');

        $blaze->output->printDoctype();
    ?>
    <html>
        <head>
            <title>Cool index page</title>
            <?php $blaze->assets->insertCSSHere(); ?>
        </head>
        <body>
            My cool body.
        </body>
    </html>

There are several things to note about this piece of code.

No script inclusion

We did not include or require any files before using $blaze. This means that $blaze must have been there before the file was called. Indeed, it has been there. blaze has done a lot of preparations, has checked if the current visitor was allowed to see the page or not, and so on.

No forced usage

We did use blaze to insert and compile the assets, but we would not have had to. blaze gives you a lot of functionality, but if at some point you don't want to use it, you don't have to. This way, you can just write normal html and use blaze in your code wherever you want to.

No big templating system

Especially when it comes to small projects and microsites, we will mostly create it in html and some other languages. If we were using a big framework, we maybe would have to rewrite it to match a templating language. Not so with blaze. Just use blaze in your initial code where you want to and take advantage of the features blaze offers.