mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Implemented rst_prologue conf.py option.
This commit is contained in:
parent
ff3707e2a5
commit
68fd75f536
@ -59,6 +59,7 @@ class Config(object):
|
||||
keep_warnings = (False, 'env'),
|
||||
modindex_common_prefix = ([], 'html'),
|
||||
rst_epilog = (None, 'env'),
|
||||
rst_prologue = (None, 'env'),
|
||||
trim_doctest_flags = (True, 'env'),
|
||||
needs_sphinx = (None, None),
|
||||
secnumber_suffix = ('. ', 'html'),
|
||||
|
@ -589,9 +589,10 @@ class BuildEnvironment:
|
||||
app.emit('source-read', docname, arg)
|
||||
data = arg[0]
|
||||
if self.config.rst_epilog:
|
||||
return data + '\n' + self.config.rst_epilog + '\n'
|
||||
else:
|
||||
return data
|
||||
data = data + '\n' + self.config.rst_epilog + '\n'
|
||||
if self.config.rst_prologue:
|
||||
data = self.config.rst_prologue + '\n' + data
|
||||
return data
|
||||
|
||||
# publish manually
|
||||
pub = Publisher(reader=SphinxStandaloneReader(),
|
||||
|
Loading…
Reference in New Issue
Block a user