mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Consistent use of "rst" for syntax highlight
This commit is contained in:
parent
50bd1c3967
commit
f303a4a9ed
@ -36,7 +36,7 @@ Setting up your project and development environment
|
||||
In a new directory, create a file called ``README.rst`` with the following
|
||||
content.
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
:caption: README.rst
|
||||
|
||||
Lumache
|
||||
@ -159,7 +159,7 @@ is written in reStructuredText, a powerful markup language.
|
||||
|
||||
Modify the file as follows:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/index.rst
|
||||
|
||||
Welcome to Lumache's documentation!
|
||||
@ -330,7 +330,7 @@ grows.
|
||||
As an example, create a new file ``docs/source/usage.rst`` (next to
|
||||
``index.rst``) with these contents:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
|
||||
Usage
|
||||
@ -358,7 +358,7 @@ be a *subsection* of "Usage".
|
||||
To complete the process, add a ``toctree`` :ref:`directive <rst-directives>` at
|
||||
the end of ``index.rst`` including the document you just created, as follows:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/index.rst
|
||||
|
||||
Contents
|
||||
@ -397,7 +397,7 @@ them!
|
||||
To add a cross-reference, write this sentence right after the
|
||||
introduction paragraph in ``index.rst``:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/index.rst
|
||||
|
||||
Check out the :doc:`usage` section for further information.
|
||||
@ -412,7 +412,7 @@ explicit *label* that can act as a target.
|
||||
For example, to reference the "Installation" subsection, add a label right
|
||||
before the heading, as follows:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/usage.rst
|
||||
:emphasize-lines: 4
|
||||
|
||||
@ -428,7 +428,7 @@ before the heading, as follows:
|
||||
|
||||
And make the sentence you added in ``index.rst`` look like this:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
:caption: docs/source/index.rst
|
||||
|
||||
Check out the :doc:`usage` section for further information, including how to
|
||||
|
@ -74,14 +74,14 @@ multiple files to a single hierarchy of documents.
|
||||
|
||||
The ``toctree`` directive initially is empty, and looks like so:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
You add documents listing them in the *content* of the directive:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: rst
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
@ -172,7 +172,7 @@ The most prominent domain is the Python domain. For example, to document
|
||||
Python's built-in function ``enumerate()``, you would add this to one of your
|
||||
source files.
|
||||
|
||||
.. code-block:: restructuredtext
|
||||
.. code-block:: rst
|
||||
|
||||
.. py:function:: enumerate(sequence[, start=0])
|
||||
|
||||
@ -193,7 +193,7 @@ given, each in its own line.
|
||||
The Python domain also happens to be the default domain, so you don't need to
|
||||
prefix the markup with the domain name.
|
||||
|
||||
.. code-block:: restructuredtext
|
||||
.. code-block:: rst
|
||||
|
||||
.. function:: enumerate(sequence[, start=0])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user