Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37eb137

Browse files
committed
Update documentation
1 parent8dec729 commit37eb137

File tree

1 file changed

+27
-71
lines changed

1 file changed

+27
-71
lines changed

‎contributing/documentation/format.rst

Lines changed: 27 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,26 @@ The Symfony2 documentation uses `reStructuredText`_ as its markup language and
77
reStructuredText
88
----------------
99

10-
reStructuredText "is an easy-to-read, what-you-see-is-what-you-get plaintext
11-
markup syntax and parser system".
10+
reStructuredText*"is an easy-to-read, what-you-see-is-what-you-get plaintext
11+
markup syntax and parser system"*.
1212

1313
You can learn more about its syntax by reading existing Symfony2 `documents`_
1414
or by reading the `reStructuredText Primer`_ on the Sphinx website.
1515

16-
If you are familiar with Markdown, be careful as things are sometimes very
17-
similar but different:
16+
..caution::
1817

19-
* Lists starts at the beginning of a line (no indentation is allowed);
18+
If you are familiar with Markdown, be careful as things are sometimes very
19+
similar but different:
2020

21-
* Inline code blocks use double-ticks (````like this````).
21+
* Lists starts at the beginning of a line (no indentation is allowed);
22+
* Inline code blocks use double-ticks (````like this````).
2223

2324
Sphinx
2425
------
2526

2627
Sphinx is a build system that adds some nice tools to create documentation
2728
from reStructuredText documents. As such, it adds new directives and
28-
interpreted text roles to standard reST `markup`_.
29+
interpreted text roles tothestandard reST `markup`_.
2930

3031
Syntax Highlighting
3132
~~~~~~~~~~~~~~~~~~~
@@ -71,7 +72,7 @@ directive to show the configuration in all supported configuration formats
7172
7273
.. code-block:: xml
7374
74-
<!-- Configuration in XML//-->
75+
<!-- Configuration in XML -->
7576
7677
.. code-block:: php
7778
@@ -87,35 +88,29 @@ The previous reST snippet renders as follow:
8788
8889
..code-block::xml
8990
90-
<!-- Configuration in XML//-->
91+
<!-- Configuration in XML-->
9192
9293
..code-block::php
9394
9495
// Configuration in PHP
9596
9697
The current list of supported formats are the following:
9798

98-
+-----------------+-------------+
99-
| Markup format| Displayed|
100-
+=================+=============+
101-
| html| HTML|
102-
+-----------------+-------------+
103-
| xml| XML|
104-
+-----------------+-------------+
105-
| php| PHP|
106-
+-----------------+-------------+
107-
| yaml| YAML|
108-
+-----------------+-------------+
109-
| jinja| Twig|
110-
+-----------------+-------------+
111-
| html+jinja| Twig|
112-
+-----------------+-------------+
113-
| html+php| PHP|
114-
+-----------------+-------------+
115-
| ini| INI|
116-
+-----------------+-------------+
117-
| php-annotations| Annotations|
118-
+-----------------+-------------+
99+
=============== ==============
100+
Markup format Displayed
101+
=============== ==============
102+
html HTML
103+
xml XML
104+
php PHP
105+
yaml YAML
106+
jinja Twig
107+
html+jinja Twig
108+
html+php PHP
109+
ini INI
110+
php-annotations Annotations
111+
php-standalone Standalone Use
112+
php-symfony Framework Use
113+
=============== ==============
119114

120115
Adding Links
121116
~~~~~~~~~~~~
@@ -169,53 +164,14 @@ Testing Documentation
169164
To test documentation before a commit:
170165

171166
* Install `Sphinx`_;
172-
173-
* Run the `Sphinx quick setup`_;
174-
175-
* Install the Sphinx extensions (see below);
176-
167+
* Install the Sphinx extensions using git submodules: ``git submodule update --init``;
168+
* (Optionally) Install the bundle docs and CMF docs: ``bash install.sh``;
177169
* Run ``make html`` and view the generated HTML in the ``build`` directory.
178170

179-
Installing the Sphinx extensions
180-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181-
182-
* Download the extension from the `source`_ repository
183-
184-
* Copy the ``sensio`` directory to the ``_exts`` folder under your source
185-
folder (where ``conf.py`` is located)
186-
187-
* Add the following to the ``conf.py`` file:
188-
189-
..code-block::py
190-
191-
# ...
192-
sys.path.append(os.path.abspath('_exts'))
193-
194-
# adding PhpLexer
195-
from sphinx.highlightingimport lexers
196-
from pygments.lexers.webimport PhpLexer
197-
198-
# ...
199-
# add the extensions to the list of extensions
200-
extensions= [...,'sensio.sphinx.refinclude','sensio.sphinx.configurationblock','sensio.sphinx.phpcode']
201-
202-
# enable highlighting for PHP code not between ``<?php ... ?>`` by default
203-
lexers['php']= PhpLexer(startinline=True)
204-
lexers['php-annotations']= PhpLexer(startinline=True)
205-
lexers['php-standalone']= PhpLexer(startinline=True)
206-
lexers['php-symfony']= PhpLexer(startinline=True)
207-
208-
# use PHP as the primary domain
209-
primary_domain='php'
210-
211-
# set URL for API links
212-
api_url='http://api.symfony.com/master/%s'
213-
214171
.. _reStructuredText:http://docutils.sourceforge.net/rst.html
215172
.. _Sphinx:http://sphinx-doc.org/
216173
.. _documents:https://github.com/symfony/symfony-docs
217174
.. _reStructuredText Primer:http://sphinx-doc.org/rest.html
218175
.. _markup:http://sphinx-doc.org/markup/
219176
.. _Pygments website:http://pygments.org/languages/
220-
.. _source:https://github.com/fabpot/sphinx-php
221177
.. _Sphinx quick setup:http://sphinx-doc.org/tutorial.html#setting-up-the-documentation-sources

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp