Skip to content

Commit

Permalink
Docs: Sphinx-Immaterial 0.8.1 already fixes jbms/sphinx-immaterial#132
Browse files Browse the repository at this point in the history
  • Loading branch information
brechtm committed Aug 17, 2022
1 parent 55b493a commit fa69083
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 = ' [<a class="pdf-link" href="{relpath}{name}.pdf">PDF</a>]'


Expand Down

0 comments on commit fa69083

Please sign in to comment.