Skip to content

Fix doc build instructions #1367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 24 additions & 17 deletions contributing/documentation/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ To test documentation before a commit:

* Run the `Sphinx quick setup`_;

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

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

Installing the configuration-block Sphinx extension
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Installing the Sphinx extensions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

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

Expand All @@ -148,14 +148,21 @@ Installing the configuration-block Sphinx extension
sys.path.append(os.path.abspath('_exts'))

# ...
# add configurationblock to the list of extensions
extensions = ['configurationblock']

.. _reStructuredText: http://docutils.sf.net/rst.html
.. _Sphinx: http://sphinx.pocoo.org/
.. _documents: http://github.com/symfony/symfony-docs
.. _reStructuredText Primer: http://sphinx.pocoo.org/rest.html
.. _markup: http://sphinx.pocoo.org/markup/
.. _Pygments website: http://pygments.org/languages/
.. _configuration-block source: https://github.com/fabpot/sphinx-php
.. _Sphinx quick setup: http://sphinx.pocoo.org/tutorial.html#setting-up-the-documentation-sources
# add the extensions to the list of extensions
extensions = [..., 'sensio.sphinx.refinclude', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode']

# enable highlighting for PHP code not between ``<?php ... ?>`` by default
lexers['php'] = PhpLexer(startinline=True)
lexers['php-annotations'] = PhpLexer(startinline=True)

# use PHP as the primary domain
primary_domain = 'php'

.. _reStructuredText: http://docutils.sf.net/rst.html
.. _Sphinx: http://sphinx.pocoo.org/
.. _documents: http://github.com/symfony/symfony-docs
.. _reStructuredText Primer: http://sphinx.pocoo.org/rest.html
.. _markup: http://sphinx.pocoo.org/markup/
.. _Pygments website: http://pygments.org/languages/
.. _source: https://github.com/fabpot/sphinx-php
.. _Sphinx quick setup: http://sphinx.pocoo.org/tutorial.html#setting-up-the-documentation-sources