Skip to content

Commit

Permalink
Merge branch 'release/0.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Dec 7, 2015
2 parents bc57b4b + 39c5b95 commit e2c1353
Show file tree
Hide file tree
Showing 11 changed files with 455 additions and 152 deletions.
4 changes: 2 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
# built documents.
#
# The short X.Y version.
version = '0.10.0'
version = '0.12.0'
# The full version, including alpha/beta/rc tags.
release = 'alpha 0.10.0'
release = 'alpha 0.12.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
107 changes: 0 additions & 107 deletions developer/first-steps/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,6 @@
Getting started
===============

Roadiz is a polymorphic CMS based on a node system that can handle many types of services.
It is based on *Symfony* components, *Doctrine ORM*, *Twig* and *Pimple* for maximum performances and security.

Roadiz node system allows you to create your data schema and to organize your content as you want.
We designed it to break technical constraints when you create tailor-made websites architectures and layouts.

Imagine you need to display your graphic design portfolio and… sell some t-shirts. With Roadiz you will be able to create your content forms from scratch and choose the right fields you need. Images and texts for your projects.
Images, texts, prices and even geolocation for your products. That’s why it’s called *polymorphic*.

.. _philosophy:

Philosophy
----------

When discovering Roadiz back-office interface, you will notice that there aren’t any Rich text editor also called *WYSIWYG* editors. We made the choice to promote *Markdown* syntax in order to focus on content hierarchy and quality
instead of content style. Our guideline is to preserve and respect the webdesigners' and graphic designers' work.

You’ll see that we built Roadiz as webdesigners and for webdesigners. It will allow you to create really quickly website
prototypes using *Twig* templates. But as the same time you will be able to get the power of the *Symfony* and *Doctrine* core components
to build complex applications.

We also decided to be really strict about Plugins and other addons modules. How many of yours do not upgrade your Wordpress website because of plugin dependencies? We decided not to build Roadiz around a “Plugin” system but a **Theme system**, as every Roadiz extensions will have to serve a theme’s features. Themes will enable you to create awesome website layouts but also great back-office additions for your customers. You will be able to centralize all your custom code in one place, so you can use a versioning tool such as Git.

Roadiz theme system will allow you to daisy-chain themes and dispatch features on multiple code. As our CMS is built on Pimple dependency injection container, Roadiz can merge every available themes on the same website. For example, you will be able to create one portfolio theme using Node-system Urls and unlimited static themes which will use a static routing scheme, for a Forum or a Blog or even both! Theme system will even allow you to create additional Doctrine entities and extend our back-office. Yes, just sit on your theme code and you can extend Roadiz to create a manager for your Forum. Cherry on the cake, you can assign each theme to a specific domain name to create mobile or media specific layouts. Believe me, this cake is not a lie.

We want Roadiz to be a great tool for designers and developers to build strong web experiences together. But we thought of editors too! Roadiz back-office theme “Rozier” has been designed to offer every back-users a great writing and administrating experience.

CMS Structure
-------------
Expand Down Expand Up @@ -91,84 +65,3 @@ And do not use built-in ``mod_php``, prefer *PHP-FPM* ;-)

Then use ``/samples/apache.conf`` template to create your *virtual host* configuration file. It shows how to set rewrite and
secure private folders from being viewed from public visitors.

Installation
------------

Roadiz can be installed in two different ways:

* The Good one : using **Git** and **Composer** (needs an SSH connnexion to your server)
* The Easy one : using a bundled Zip archive with composer dependencies.

Using Git (recommended)
^^^^^^^^^^^^^^^^^^^^^^^

First you will have to setup properly your server virtual host. You can either use *Apache* or *Nginx* with Roadiz.
An example virtual host is provided in source-code for each server:

* ``samples/apache.conf``
* ``samples/nginx.conf``

You just have to customize your root path and server name. *Nginx* has built-in support for *php-fpm* whereas *Apache* must be configured with *fastcgi* to do the same.

These example files will provide basic security configuration for private access folders:
such as ``conf`` or ``files/fonts`` folders. They will also configure your server to redirect all non static requests
to Roadiz *front-controller*.

.. note::
**For shared hosting plan owners**, if you can’t modify your virtual host definition, don’t panic, Roadiz has a built-in CLI command to generate ``.htaccess`` files for you.
Just execute ``bin/roadiz config --generate-htaccess`` after cloning Roadiz sources and running Composer.
In the other hand, if you are using *Apache* and have access to your virtual host, we strongly recommend you to use our sample configuration and disable ``.htaccess`` files: performances are at their best
without them.

When your HTTP server is ready to go, download *Roadiz* latest version using Git:

.. code-block:: bash
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.

.. 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;
When your virtual host is ready, just go to your website to start with the setup assistant.

.. note::
Once your website will be ready to be pushed to production you will be able to
optimize *Composer* autoload process: ``composer dumpautoload -o``

The quick and dirty way: using a Zip archive
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This method must be used if you have to work on your own computer with softwares like MAMP, WAMP or
if you need to setup your website on a shared hosting plan without any SSH or Git.

If you downloaded Roadiz on the `Github release <https://github.com/roadiz/roadiz/releases>`_ page or
`directly from our website <http://www.roadiz.io>`_, you should get a bundled Zip containing every
Roadiz files and Composer dependencies. We even generated ``.htaccess`` files and a ``conf/config.yml`` file for you.

If you can unzip directly on your server, that is cool. It will save you time,
if not, just unzip it on your desktop and upload files to your server via FTP.

.. warning::
When you transfer your Roadiz site via FTP make sure ``.htaccess`` files are copied into each important
folders (``./``, ``./conf``, ``./src``, ``./files/fonts``, etc). If you are using an Apache setup, this will prevent
unwanted access to important files.

Once you unzipped and moved your Roadiz files into your webserver folder, just launch the Install
tool with your Internet browser by typing your new website address. If you are working on your own computer
with MAMP, WAMP or other easy-server tool, just type ``http://localhost:8888/roadiz-folder`` in your browser (the port may change
according to your server settings).

You have to understand that using Zip archive way with FTP transfers will make updating Roadiz harder.
If you have a dedicated server or a VPS, we highly recommend you to use Git and Composer to install Roadiz. That way,
you will be able to upgrade Roadiz just by typing ``git pull origin master``.
1 change: 1 addition & 0 deletions developer/first-steps/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ First steps
:maxdepth: 2

getting_started
installation
manual_config
upgrading
moving
Expand Down
136 changes: 136 additions & 0 deletions developer/first-steps/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
.. _installation:

============
Installation
============

Download sources
----------------

Roadiz can be downloaded in two different ways:

* *The Good one*: using **Git** and **Composer** (needs an SSH connnexion to your server)
* *The Easy one*: using a bundled Zip archive with composer dependencies.

Using Git (recommended)
^^^^^^^^^^^^^^^^^^^^^^^

First you will have to setup properly your server virtual host. You can either use *Apache* or *Nginx* with Roadiz.
An example virtual host is provided in source-code for each server:

* ``samples/apache.conf``
* ``samples/nginx.conf``

You just have to customize your root path and server name. *Nginx* has built-in support for *php-fpm* whereas *Apache* must be configured with *fastcgi* to do the same.

These example files will provide basic security configuration for private access folders:
such as ``conf`` or ``files/fonts`` folders. They will also configure your server to redirect all non static requests
to Roadiz *front-controller*.

.. note::
**For shared hosting plan owners**, if you can’t modify your virtual host definition, don’t panic, Roadiz has a built-in CLI command to generate ``.htaccess`` files for you.
Just execute ``bin/roadiz config --generate-htaccess`` after cloning Roadiz sources and running Composer.
In the other hand, if you are using *Apache* and have access to your virtual host, we strongly recommend you to use our sample configuration and disable ``.htaccess`` files: performances are at their best
without them.

When your HTTP server is ready to go, download *Roadiz* latest version using Git:

.. code-block:: bash
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.

.. 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;
When your virtual host is ready and every files have been downloaded you can go to the
next part to enable the `install environment`_.

.. note::
Once your website will be ready to be pushed to production you will be able to
optimize *Composer* autoload process: ``composer dumpautoload -o``

The quick and dirty way: using a Zip archive
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This method must be used if you have to work on your own computer with softwares like MAMP, WAMP or
if you need to setup your website on a shared hosting plan without any SSH or Git.

If you downloaded Roadiz on the `Github release <https://github.com/roadiz/roadiz/releases>`_ page or
`directly from our website <http://www.roadiz.io>`_, you should get a bundled Zip containing every
Roadiz files and Composer dependencies. We even generated ``.htaccess`` files and a ``conf/config.yml`` file for you.

If you can unzip directly on your server, that is cool. It will save you time,
if not, just unzip it on your desktop and upload files to your server via FTP.

.. warning::
When you transfer your Roadiz site via FTP make sure ``.htaccess`` files are copied into each important
folders (``./``, ``./conf``, ``./src``, ``./files/fonts``, etc). If you are using an Apache setup, this will prevent
unwanted access to important files.

Once you unzipped and moved your Roadiz files into your webserver folder, just launch the Install
tool with your Internet browser by typing your new website address. If you are working on your own computer
with MAMP, WAMP or other easy-server tool, just type ``http://localhost:8888/roadiz-folder`` in your browser (the port may change
according to your server settings).

You have to understand that using Zip archive way with FTP transfers will make updating Roadiz harder.
If you have a dedicated server or a VPS, we highly recommend you to use *Git* and *Composer* to install Roadiz. That way,
you will be able to upgrade Roadiz just by typing ``git pull origin master``.


Dealing with Roadiz environments
--------------------------------

.. _install environment:

Installation environment
^^^^^^^^^^^^^^^^^^^^^^^^

Once you’ve succedded to download Roadiz sources and dependencies. You’ll have to setup its database
and every informations needed to begin your website.

As every *Symfony* application do, Roadiz works using environments. By default, there is a *production*
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).

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.

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).

Preview environment
^^^^^^^^^^^^^^^^^^^

The *preview* environment is not a real one as it only adds a flag to Roadiz’ Kernel to enable
back-office users to see unpublished nodes. By default, it is available using ``preview.php``
entry point, unless you decide to remove it.

39 changes: 0 additions & 39 deletions developer/first-steps/manual_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,6 @@ Roadiz uses *Doctrine ORM* to store your data. It will directly pass this JSON p
you can use every available drivers and options from its documentation at
http://doctrine-dbal.readthedocs.org/en/latest/reference/configuration.html

Dev mode
--------

When you’ll start using Roadiz, you’ll see a *dev mode* icon under your account picture.
Development mode is useful to build your theme or when you are setting up your
node-types and node-tree. In this mode, *Doctrine* empties its caches every time you load
a page and *Twig* templates are regenerated each time you update them. It is very convenient
when your are working on your themes but it is a lot slower.

When switching to production mode, you must disable *devMode* so that database metadata
and *Twig* templates are requested from cache. It is even better if you have a *Var cache*
like *APC* or *XCache* since useful data are kept in memory. This efficiency has a drawback:
you will need to empty caches if you make a code update or a Roadiz update.

.. code-block:: yaml
devMode: true
Another point about devMode is that static *Routes* are compiled for each request into a plain
PHP class (``gen-src/Compiled/…``). If you disable *devMode*, Symfony router will be a lot more efficient
and that is the same for *UrlGenerator*.


Solr endpoint
-------------

Expand Down Expand Up @@ -123,22 +100,6 @@ own parameters. You can use the argument ``--help`` to get more informations abo
./bin/roadiz install --help
CLI tools are useful to handle database upgrades and to regenerate nodes-sources entities classes.
But you can also switch *development mode* :

.. code-block:: console
# Enabling development mode
./bin/roadiz config --enable-devmode
# Disabling development mode
./bin/roadiz config --disable-devmode
You can even review every user roles:

.. code-block:: console
./bin/roadiz users
We even made *Doctrine* CLI tools directly available from Roadiz Console. Be careful, these are powerful
commands which can alter your database and make you lose precious datas. Especially when you will need to update
Expand Down
1 change: 1 addition & 0 deletions developer/first-steps/moving.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Now you can perform a schema update without losing your nodes data
bin/roadiz orm:schema-tool:update --force;
bin/roadiz cache --clear-all
# You can use -a as a shortcut to --clear-all
.. note::
If you are using an OPcode cache like XCache or APC, you’ll need to purge cache manually
Expand Down
3 changes: 2 additions & 1 deletion developer/themes/custom_assignations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ and a ``blockAction`` method inside.
namespace Themes\MyTheme\Controllers\Blocks;
use RZ\Roadiz\Core\Entities\NodesSources;
use RZ\Roadiz\Core\Exceptions\ForceResponseException;
use Symfony\Component\HttpFoundation\Request;
use Themes\MyTheme\MyThemeApp;
Expand All @@ -300,7 +301,7 @@ and a ``blockAction`` method inside.
$form->handleRequest($request);
if ($form->isValid()) {
// some stuff
return $this->redirect($request->getUri());
throw new ForceResponseException($this->redirect($request->getUri()));
}
$this->assignation['contactForm'] = $form->createView();
Expand Down
3 changes: 2 additions & 1 deletion developer/themes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Themes

create_theme
using_twig
custom_assignations
custom_assignations
theme_firewall

0 comments on commit e2c1353

Please sign in to comment.