From fa6908366e6d11f1bfac654a29446d63e96f1dda Mon Sep 17 00:00:00 2001 From: Brecht Machiels Date: Wed, 17 Aug 2022 15:34:51 +0200 Subject: [PATCH] Docs: Sphinx-Immaterial 0.8.1 already fixes jbms/sphinx-immaterial#132 --- doc/conf.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index cac662689..669fcc978 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -132,18 +132,6 @@ html_css_files = ['tweaks.css'] -# monkey-patch Sphinx-immaterial so that it can handle the only directive -# https://github.com/jbms/sphinx-immaterial/issues/132#issuecomment-1186491799 -import sphinx_immaterial -import sphinx.addnodes -import docutils.nodes - -def visit_only(self, node: sphinx.addnodes.only): - raise docutils.nodes.SkipChildren - -sphinx_immaterial.nav_adapt._TocVisitor.visit_only = visit_only - - # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. @@ -258,6 +246,10 @@ def visit_only(self, node: sphinx.addnodes.only): htmlhelp_basename = 'rinohtype' +# monkey-patch sphinx_immaterial to link to manual/reference PDS from nav panel +import sphinx +import sphinx_immaterial + PDF_LINK = ' [PDF]'