Commits

tpowers  committed c5ad17a

Implemented rst_prologue conf.py option.

  • Participants
  • Parent commits 462aeee

Comments (0)

Files changed (2)

File sphinx/config.py

         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'),

File sphinx/environment.py

                     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(),