@@ -128,17 +128,17 @@ To test documentation before a commit:
128
128
129
129
* Run the `Sphinx quick setup `_;
130
130
131
- * Install the configuration-block Sphinx extension (see below);
131
+ * Install the Sphinx extensions (see below);
132
132
133
133
* Run ``make html `` and view the generated HTML in the ``build `` directory.
134
134
135
- Installing the configuration-block Sphinx extension
136
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135
+ Installing the Sphinx extensions
136
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137
137
138
- * Download the extension from the `configuration-block source `_ repository
138
+ * Download the extension from the `source `_ repository
139
139
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)
142
142
143
143
* Add the following to the ``conf.py `` file:
144
144
@@ -148,14 +148,21 @@ Installing the configuration-block Sphinx extension
148
148
sys.path.append(os.path.abspath(' _exts' ))
149
149
150
150
# ...
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