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

[WIP] Travis integration#3328

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
weaverryan merged 10 commits intosymfony:2.3fromwouterj:travis_integration
Mar 20, 2014
Merged
Changes from1 commit
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
PrevPrevious commit
Update documentation
  • Loading branch information
@wouterj
wouterj committedFeb 1, 2014
commit37eb1376826b5c30452af8a3710bec6f9036d1c0
98 changes: 27 additions & 71 deletionscontributing/documentation/format.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,25 +7,26 @@ The Symfony2 documentation uses `reStructuredText`_ as its markup language and
reStructuredText
----------------

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

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

If you are familiar with Markdown, be careful as things are sometimes very
similar but different:
.. caution::

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

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

Sphinx
------

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

Syntax Highlighting
~~~~~~~~~~~~~~~~~~~
Expand DownExpand Up@@ -71,7 +72,7 @@ directive to show the configuration in all supported configuration formats

.. code-block:: xml

<!-- Configuration in XML//-->
<!-- Configuration in XML -->

.. code-block:: php

Expand All@@ -87,35 +88,29 @@ The previous reST snippet renders as follow:

.. code-block:: xml

<!-- Configuration in XML//-->
<!-- Configuration in XML -->

.. code-block:: php

// Configuration in PHP

The current list of supported formats are the following:

+-----------------+-------------+
| Markup format | Displayed |
+=================+=============+
| html | HTML |
+-----------------+-------------+
| xml | XML |
+-----------------+-------------+
| php | PHP |
+-----------------+-------------+
| yaml | YAML |
+-----------------+-------------+
| jinja | Twig |
+-----------------+-------------+
| html+jinja | Twig |
+-----------------+-------------+
| html+php | PHP |
+-----------------+-------------+
| ini | INI |
+-----------------+-------------+
| php-annotations | Annotations |
+-----------------+-------------+
=============== ==============
Markup format Displayed
=============== ==============
html HTML
xml XML
php PHP
yaml YAML
jinja Twig
html+jinja Twig
html+php PHP
ini INI
php-annotations Annotations
php-standalone Standalone Use
php-symfony Framework Use
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

added php-standalone and php-symfony, since they were introduced infabpot/sphinx-php#3

=============== ==============

Adding Links
~~~~~~~~~~~~
Expand DownExpand Up@@ -169,53 +164,14 @@ Testing Documentation
To test documentation before a commit:

* Install `Sphinx`_;

* Run the `Sphinx quick setup`_;

* Install the Sphinx extensions (see below);

* Install the Sphinx extensions using git submodules: ``git submodule update --init``;
* (Optionally) Install the bundle docs and CMF docs: ``bash install.sh``;
* Run ``make html`` and view the generated HTML in the ``build`` directory.

Installing the Sphinx extensions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Download the extension from the `source`_ repository

* 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:

.. code-block:: py

# ...
sys.path.append(os.path.abspath('_exts'))

# adding PhpLexer
from sphinx.highlighting import lexers
from pygments.lexers.web import PhpLexer

# ...
# 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)
lexers['php-standalone'] = PhpLexer(startinline=True)
lexers['php-symfony'] = PhpLexer(startinline=True)

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

# set URL for API links
api_url = 'http://api.symfony.com/master/%s'

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

[8]ページ先頭

©2009-2025 Movatter.jp