Skip to content

Commit

Permalink
Merge branch 'release/v0.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Dec 7, 2015
2 parents e2c1353 + 9fddb26 commit 2512dde
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 29 deletions.
31 changes: 7 additions & 24 deletions developer/first-steps/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,12 @@ When your HTTP server is ready to go, download *Roadiz* latest version using Git
cd your/webroot/folder;
git clone git@github.com:roadiz/roadiz.git ./;
Use `Composer <https://getcomposer.org/doc/00-intro.md#globally>`_ to download Roadiz dependencies and to build PHP class autolader.
Use `Composer <https://getcomposer.org/doc/00-intro.md#globally>`_ to download Roadiz dependencies and to build PHP class autolader. We even set up some post-scripts which will copy a new ``config.yml``, ``dev.php`` and ``install.php`` files for you.

.. code-block:: bash
composer install -n --no-dev;
Then copy `conf/config.default.yml` file to `conf/config.yml`.

.. code-block:: bash
cp conf/config.default.yml conf/config.yml;
# Install Roadiz dependencies, prepare a fresh config file and your
# own dev and install entry points.
composer install --no-dev;
When your virtual host is ready and every files have been downloaded you can go to the
next part to enable the `install environment`_.
Expand Down Expand Up @@ -102,15 +97,7 @@ As every *Symfony* application do, Roadiz works using environments. By default,
environment which is handled by ``index.php`` entry point. At this moment, if you try to connect to
your fresh new Roadiz website, you will get an error as we did not install its database and its essential data.

To be able to use Roadiz *install interface*, you’ll need to copy ``samples/install.php.sample`` to ``install.php``. This will enable
a new environment called *install* reachable at the Url ``http://mywebsite.com/install.php``. For security reasons, we added an IP filtering in
this entry point, you can add your own IP address in the following array: ``array('127.0.0.1', 'fe80::1', '::1')``.
This IP filtering is very important if you are working on a public server, no one except you should be able to access
*install* entry point.

.. note::
For those who downloaded Roadiz using the Zip archive, an ``install.php`` file should be already available
in your website folder, just edit it to add you own IP address(es).
To be able to use Roadiz *install interface*, you’ll need to call the *install* environment entry point. A ``install.php`` file has been generated when you executed ``composer install`` command. This environment will be reachable at the Url ``http://mywebsite.com/install.php``. For security reasons, we added an IP filtering in this entry point, you can add your own IP address in the following array: ``array('127.0.0.1', 'fe80::1', '::1')``. This IP filtering is very important if you are working on a public server, no one except you should be able to access *install* entry point.

At the end of the install process, you will be invited to remove the ``install.php`` file and to connect to your
website final URL.
Expand All @@ -120,12 +107,8 @@ Development environment

Roadiz *production* environment is not made for developing your own themes and extending back-office features.
As the same way as *install* environment, we prepared a *dev* environment to disable resources caching and enable
debug features. Just copy ``samples/dev.php.sample`` to ``dev.php``, and like *install* entry point, you’ll need
to add your own IP address to filter who can access to your *dev* environment.

.. note::
For those who downloaded Roadiz using the Zip archive, an ``dev.php`` file should be already available
in your website folder, just edit it to add you own IP address(es).
debug features. You’ll find a ``dev.php`` file at your website root which was generated at ``composer install`` command.
As well as *install.php* entry point, you’ll need to add your own IP address to filter who can access to your *dev* environment.

Preview environment
^^^^^^^^^^^^^^^^^^^
Expand Down
13 changes: 8 additions & 5 deletions developer/themes/create_theme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,25 @@ Each theme is a folder which must be placed in ``themes/`` folder. Roadiz comes

- *Install* : It’s the first page theme you see when you launch Roadiz in your browser for the first time.
- *Rozier* : Here is the REZO ZERO designed backoffice for Roadiz, it’s available from ``rz-admin/`` url and protected by firewall.
- *DefaultTheme* : It’s… the default theme which can be copied to start your own themes.
- *DefaultTheme* : It’s a demo theme which is mainly used to demonstrate basic Roadiz features and to try the back-office editing capabilities.

As these 3 themes come bundled with Roadiz, you can’t edit or update their files. Your changes would be overrode
the next time you update Roadiz via Git or direct download. If you want to create your own Backoffice, you can. Just name it differently and hook it in backoffice or using CLI commands.

.. note::
We configured *Git* versioning tool to ignore every additional theme you create in ``/themes`` folder. So you can **initialize your a new git repository per custom theme you create.** That way you can use code versioning independently from Roadiz updates.

Preparing your own frontend theme
---------------------------------

First copy ``DefaultTheme`` folder and rename it against your new theme. Keep in mind that *DefaultTheme*
folder will be overrode at each CMS updates, so don’t update its files or you’ll suffer of losing precious
data. And we don’t want you to be mad at us.
To start from a fresh and clean foundation, we encourage you to clone our `BaseTheme <https://github.com/roadiz/BaseTheme>`_ and to rename it against your new theme name.

So once you duplicated and renamed *DefaultTheme* with your own sweet name, do not forget to rename every references in:
So once you duplicated and renamed *BaseTheme* with your own sweet name, do not forget to rename every references in:

* ``MyAwesomeTheme/config.yml`` theme definition file.
* **Folder name** and **Class namespace** must be the same (Ex: “MyAwesomeTheme”) for making autoloader works with your theme.
* **Theme entry point class**: your main theme class must be named after your folder name plus ``App`` suffix (Ex: “MyAwesomeThemeApp.php”)
* In each twig templates: replace ``@BaseTheme`` with your own theme name with the ``@`` character before.
* **Resources/routes.yml**: rename every route class path using your namespace:

.. code-block:: yaml
Expand Down

0 comments on commit 2512dde

Please sign in to comment.