Skip to content

Commit 610d989

Browse files
committed
Merge pull request #1367 from symfony/fix-doc-build-instructions
Fix doc build instructions
2 parents b6d05f6 + 8ec8b3c commit 610d989

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

contributing/documentation/format.rst

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,17 @@ To test documentation before a commit:
128128

129129
* Run the `Sphinx quick setup`_;
130130

131-
* Install the configuration-block Sphinx extension (see below);
131+
* Install the Sphinx extensions (see below);
132132

133133
* Run ``make html`` and view the generated HTML in the ``build`` directory.
134134

135-
Installing the configuration-block Sphinx extension
136-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135+
Installing the Sphinx extensions
136+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137137

138-
* Download the extension from the `configuration-block source`_ repository
138+
* Download the extension from the `source`_ repository
139139

140-
* Copy the ``configurationblock.py`` to the ``_exts`` folder under your
141-
source folder (where ``conf.py`` is located)
140+
* Copy the ``sensio`` directory to the ``_exts`` folder under your source
141+
folder (where ``conf.py`` is located)
142142

143143
* Add the following to the ``conf.py`` file:
144144

@@ -148,14 +148,21 @@ Installing the configuration-block Sphinx extension
148148
sys.path.append(os.path.abspath('_exts'))
149149
150150
# ...
151-
# add configurationblock to the list of extensions
152-
extensions = ['configurationblock']
153-
154-
.. _reStructuredText: http://docutils.sf.net/rst.html
155-
.. _Sphinx: http://sphinx.pocoo.org/
156-
.. _documents: http://github.com/symfony/symfony-docs
157-
.. _reStructuredText Primer: http://sphinx.pocoo.org/rest.html
158-
.. _markup: http://sphinx.pocoo.org/markup/
159-
.. _Pygments website: http://pygments.org/languages/
160-
.. _configuration-block source: https://github.com/fabpot/sphinx-php
161-
.. _Sphinx quick setup: http://sphinx.pocoo.org/tutorial.html#setting-up-the-documentation-sources
151+
# add the extensions to the list of extensions
152+
extensions = [..., 'sensio.sphinx.refinclude', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode']
153+
154+
# enable highlighting for PHP code not between ``<?php ... ?>`` by default
155+
lexers['php'] = PhpLexer(startinline=True)
156+
lexers['php-annotations'] = PhpLexer(startinline=True)
157+
158+
# use PHP as the primary domain
159+
primary_domain = 'php'
160+
161+
.. _reStructuredText: http://docutils.sf.net/rst.html
162+
.. _Sphinx: http://sphinx.pocoo.org/
163+
.. _documents: http://github.com/symfony/symfony-docs
164+
.. _reStructuredText Primer: http://sphinx.pocoo.org/rest.html
165+
.. _markup: http://sphinx.pocoo.org/markup/
166+
.. _Pygments website: http://pygments.org/languages/
167+
.. _source: https://github.com/fabpot/sphinx-php
168+
.. _Sphinx quick setup: http://sphinx.pocoo.org/tutorial.html#setting-up-the-documentation-sources

0 commit comments

Comments
 (0)