Skip to content

Commit 8a13a07

Browse files
committed
minor #6835 Updated the instructions to build docs locally (javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- Updated the instructions to build docs locally This finishes #6395. Commits ------- a2428a4 Minor improvements 914dd30 Fixed the "make" command 77c88bf Fixed again the tricky list syntax 767b49b Fixed the syntax of the list c71ad4b Minor fixes a7b4d32 Reword the third step cebc382 Added the missing link references 348b11c Updated the instructions to build docs locally
2 parents 5a5720f + a2428a4 commit 8a13a07

File tree

2 files changed

+32
-15
lines changed

2 files changed

+32
-15
lines changed

contributing/documentation/format.rst

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ tutorial and the `reStructuredText Reference`_.
2727
Sphinx
2828
------
2929

30-
Sphinx is a build system that provides tools to create documentation from
30+
Sphinx_ is a build system that provides tools to create documentation from
3131
reStructuredText documents. As such, it adds new directives and interpreted text
3232
roles to the standard reST markup. Read more about the `Sphinx Markup Constructs`_.
3333

@@ -198,20 +198,6 @@ reached end-of-maintenance will be removed. For example, if Symfony 2.5 were
198198
released today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded``
199199
tags would be removed from the new ``2.5`` branch.
200200

201-
Testing Documentation
202-
~~~~~~~~~~~~~~~~~~~~~
203-
204-
When submitting a new content to the documentation repository or when changing
205-
any existing resource, an automatic process will check if your documentation is
206-
free of syntax errors and is ready to be reviewed.
207-
208-
Nevertheless, if you prefer to do this check locally on your own machine before
209-
submitting your documentation, follow these steps:
210-
211-
* Install Sphinx_;
212-
* Install the Sphinx extensions using git submodules: ``$ git submodule update --init``;
213-
* Run ``make html`` and view the generated HTML in the ``_build/html`` directory.
214-
215201
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
216202
.. _Sphinx: http://sphinx-doc.org/
217203
.. _`Symfony documentation`: https://github.com/symfony/symfony-docs

contributing/documentation/overview.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,33 @@ link displayed for Platform.sh service.
258258
Only Pull Requests to maintained branches are automatically built by
259259
Platform.sh. Check the `roadmap`_ for maintained branches.
260260

261+
Build the Documentation Locally
262+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
263+
264+
Alternatively you can build the documentation in your own computer for testing
265+
purposes following these steps:
266+
267+
#. Install `pip`_ as explained in the `pip installation`_ article.
268+
269+
#. Install `Sphinx`_ and `Sphinx Extensions for PHP and Symfony`_
270+
(depending on your system, you may need to execute this command as root user):
271+
272+
.. code-block:: bash
273+
274+
$ pip install sphinx~=1.3.0 git+https://github.com/fabpot/sphinx-php.git
275+
276+
#. Run the following command to build the documentation in HTML format:
277+
278+
.. code-block:: bash
279+
280+
# Linux and macOS
281+
$ ./_build/make html
282+
283+
# Windows
284+
$ _build\make html
285+
286+
The generated documentation is available in the ``_build/html`` directory.
287+
261288
Frequently Asked Questions
262289
--------------------------
263290

@@ -316,3 +343,7 @@ definitely don't want you to waste your time!
316343
.. _`sync your fork`: https://help.github.com/articles/syncing-a-fork
317344
.. _`Platform.sh`: https://platform.sh
318345
.. _`roadmap`: https://symfony.com/roadmap
346+
.. _`pip`: https://pip.pypa.io/en/stable/
347+
.. _`pip installation`: https://pip.pypa.io/en/stable/installing/
348+
.. _`Sphinx`: http://sphinx-doc.org/
349+
.. _`Sphinx Extensions for PHP and Symfony`: https://github.com/fabpot/sphinx-php

0 commit comments

Comments
 (0)