mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #4420: Docs conflict on use of rst_prolog and rst_epilog
This commit is contained in:
parent
557514330f
commit
390ea6d35a
@ -192,8 +192,9 @@ General configuration
|
|||||||
.. index:: pair: global; substitutions
|
.. index:: pair: global; substitutions
|
||||||
|
|
||||||
A string of reStructuredText that will be included at the end of every source
|
A string of reStructuredText that will be included at the end of every source
|
||||||
file that is read. This is the right place to add substitutions that should
|
file that is read. This is a possible place to add substitutions that should
|
||||||
be available in every file. An example::
|
be available in every file (another being :confval:`rst_prolog`). An
|
||||||
|
example::
|
||||||
|
|
||||||
rst_epilog = """
|
rst_epilog = """
|
||||||
.. |psf| replace:: Python Software Foundation
|
.. |psf| replace:: Python Software Foundation
|
||||||
@ -203,8 +204,16 @@ General configuration
|
|||||||
|
|
||||||
.. confval:: rst_prolog
|
.. confval:: rst_prolog
|
||||||
|
|
||||||
|
.. index:: pair: global; substitutions
|
||||||
|
|
||||||
A string of reStructuredText that will be included at the beginning of every
|
A string of reStructuredText that will be included at the beginning of every
|
||||||
source file that is read.
|
source file that is read. This is a possible place to add substitutions that
|
||||||
|
should be available in every file (another being :confval:`rst_epilog`). An
|
||||||
|
example::
|
||||||
|
|
||||||
|
rst_prolog = """
|
||||||
|
.. |psf| replace:: Python Software Foundation
|
||||||
|
"""
|
||||||
|
|
||||||
.. versionadded:: 1.0
|
.. versionadded:: 1.0
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ How do I...
|
|||||||
Use themes, see :doc:`theming`.
|
Use themes, see :doc:`theming`.
|
||||||
|
|
||||||
... add global substitutions or includes?
|
... add global substitutions or includes?
|
||||||
Add them in the :confval:`rst_epilog` config value.
|
Add them in the :confval:`rst_prolog` or :confval:`rst_epilog` config value.
|
||||||
|
|
||||||
... display the whole TOC tree in the sidebar?
|
... display the whole TOC tree in the sidebar?
|
||||||
Use the :data:`toctree` callable in a custom layout template, probably in the
|
Use the :data:`toctree` callable in a custom layout template, probably in the
|
||||||
|
@ -508,11 +508,14 @@ or this::
|
|||||||
See the :duref:`reST reference for substitutions <substitution-definitions>`
|
See the :duref:`reST reference for substitutions <substitution-definitions>`
|
||||||
for details.
|
for details.
|
||||||
|
|
||||||
|
.. index:: ! pair: global; substitutions
|
||||||
|
|
||||||
If you want to use some substitutions for all documents, put them into
|
If you want to use some substitutions for all documents, put them into
|
||||||
:confval:`rst_prolog` or put them into a separate file and include it into all
|
:confval:`rst_prolog` or :confval:`rst_epilog` or put them into a separate file
|
||||||
documents you want to use them in, using the :rst:dir:`include` directive. (Be
|
and include it into all documents you want to use them in, using the
|
||||||
sure to give the include file a file name extension differing from that of
|
:rst:dir:`include` directive. (Be sure to give the include file a file name
|
||||||
other source files, to avoid Sphinx finding it as a standalone document.)
|
extension differing from that of other source files, to avoid Sphinx finding it
|
||||||
|
as a standalone document.)
|
||||||
|
|
||||||
Sphinx defines some default substitutions, see :ref:`default-substitutions`.
|
Sphinx defines some default substitutions, see :ref:`default-substitutions`.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user