diff --git a/CHANGES.rst b/CHANGES.rst index d8a4f45a6e..afac078b0a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -93,3 +93,6 @@ Documentation Changes - Restore build of PDF on Read The Docs. See https://github.com/Pylons/pyramid/issues/3290 + +- Fix docs build for Sphinx 2.0. + See https://github.com/Pylons/pyramid/pull/3480 diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 3c92d1d91d..b6eb5b550f 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -338,3 +338,5 @@ Contributors - Alexandre Yukio Harano, 2018/10/05 - Arijit Basu, 2019/02/19 + +- Theron Luhn, 2019/03/30 diff --git a/docs/conf.py b/docs/conf.py index a6d37a176f..8fdebf53d6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,6 +28,7 @@ from docutils import nodes from docutils import utils +from docutils.parsers.rst import Directive def raw(*arg): @@ -326,7 +327,6 @@ def nothing(*arg): latex_elements = { 'preamble': _PREAMBLE, - 'date': '', 'releasename': 'Version', 'title': r'The Pyramid Web Framework', # 'pointsize':'12pt', # uncomment for 12pt version @@ -345,25 +345,25 @@ def nothing(*arg): #subparagraph 5 -def frontmatter(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - return [nodes.raw( - '', - format='latex')] +class FrontMatter(Directive): + def run(self): + return [nodes.raw( + '', + format='latex')] -def mainmatter(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - return [nodes.raw( - '', - format='latex')] +class MainMatter(Directive): + def run(self): + return [nodes.raw( + '', + format='latex')] -def backmatter(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - return [nodes.raw( - '', - format='latex')] +class BackMatter(Directive): + def run(self): + return [nodes.raw( + '', + format='latex')] def app_role(role, rawtext, text, lineno, inliner, options={}, content=[]): @@ -378,9 +378,9 @@ def app_role(role, rawtext, text, lineno, inliner, options={}, content=[]): def setup(app): app.add_role('app', app_role) - app.add_directive('frontmatter', frontmatter, 1, (0, 0, 0)) - app.add_directive('mainmatter', mainmatter, 1, (0, 0, 0)) - app.add_directive('backmatter', backmatter, 1, (0, 0, 0)) + app.add_directive('frontmatter', FrontMatter, 1, (0, 0, 0)) + app.add_directive('mainmatter', MainMatter, 1, (0, 0, 0)) + app.add_directive('backmatter', BackMatter, 1, (0, 0, 0)) app.connect('autodoc-process-signature', resig) diff --git a/docs/index.rst b/docs/index.rst index a1a81872c4..4b413c16da 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -152,11 +152,9 @@ Comprehensive reference material for every public API exposed by :app:`Pyramid`: .. toctree:: - :maxdepth: 1 - :glob: + :maxdepth: 2 api/index - api/* ``p*`` Scripts Documentation @@ -165,11 +163,9 @@ Comprehensive reference material for every public API exposed by ``p*`` scripts included with :app:`Pyramid`. .. toctree:: - :maxdepth: 1 - :glob: + :maxdepth: 2 pscripts/index - pscripts/* Change History