From 1c7975562a4ef82dcd33fd00d17a8d2864dff614 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 23 May 2015 09:51:29 +0200 Subject: [PATCH] [BestPractices] restructured text format for the installation instructions template --- conf.py | 3 + cookbook/bundles/best_practices.rst | 112 ++++++++++++++++++++-------- 2 files changed, 84 insertions(+), 31 deletions(-) diff --git a/conf.py b/conf.py index 291205d1d73..bbc178dc251 100644 --- a/conf.py +++ b/conf.py @@ -23,6 +23,7 @@ # adding PhpLexer from sphinx.highlighting import lexers from pygments.lexers.compiled import CLexer +from pygments.lexers.special import TextLexer from pygments.lexers.web import PhpLexer # -- General configuration ----------------------------------------------------- @@ -103,8 +104,10 @@ lexers['php-symfony'] = PhpLexer(startinline=True) lexers['varnish3'] = CLexer() lexers['varnish4'] = CLexer() +lexers['markdown'] = TextLexer() config_block = { + 'markdown': 'Markdown', 'varnish3': 'Varnish 3', 'varnish4': 'Varnish 4' } diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 46389382840..ce98706310c 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -209,52 +209,102 @@ Installation Instructions In order to ease the installation of third-party bundles, consider using the following standardized instructions in your ``README.md`` file. -.. code-block:: text +.. configuration-block:: - Installation - ============ + .. code-block:: markdown - Step 1: Download the Bundle - --------------------------- + Installation + ============ - Open a command console, enter your project directory and execute the - following command to download the latest stable version of this bundle: + Step 1: Download the Bundle + --------------------------- - ```bash - $ composer require "~1" - ``` + Open a command console, enter your project directory and execute the + following command to download the latest stable version of this bundle: - This command requires you to have Composer installed globally, as explained - in the [installation chapter](https://getcomposer.org/doc/00-intro.md) - of the Composer documentation. + ```bash + $ composer require "~1" + ``` - Step 2: Enable the Bundle - ------------------------- + This command requires you to have Composer installed globally, as explained + in the [installation chapter](https://getcomposer.org/doc/00-intro.md) + of the Composer documentation. - Then, enable the bundle by adding the following line in the `app/AppKernel.php` - file of your project: + Step 2: Enable the Bundle + ------------------------- - ```php - \\(), + ); - new \\(), - ); + // ... + } // ... } + ``` - // ... - } - ``` + .. code-block:: markdown + + Installation + ============ + + Step 1: Download the Bundle + --------------------------- + + Open a command console, enter your project directory and execute the + following command to download the latest stable version of this bundle: + + .. code-block:: bash + + $ composer require "~1" + + This command requires you to have Composer installed globally, as explained + in the `installation chapter`_ of the Composer documentation. + + Step 2: Enable the Bundle + ------------------------- + + Then, enable the bundle by adding the following line in the ``app/AppKernel.php`` + file of your project: + + .. code-block:: php + + \\(), + ); + + // ... + } + + // ... + } + + .. _`installation chapter`: https://getcomposer.org/doc/00-intro.md This template assumes that your bundle is in its ``1.x`` version. If not, change the ``"~1"`` installation version accordingly (``"~2"``, ``"~3"``, etc.)