111111# sys.path.insert(0, os.path.abspath('.'))
112112
113113# -- Project information -----------------------------------------------------
114- from os .path import dirname , exists , join
115-
116- import sphinx_rtd_theme
114+ from os .path import exists
115+ from os . path import dirname
116+ from os . path import join
117117
118118
119119def parse_version (fpath ):
@@ -180,6 +180,7 @@ def visit_Assign(self, node):
180180]
181181
182182todo_include_todos = True
183+ myst_heading_anchors = 3
183184napoleon_google_docstring = True
184185napoleon_use_param = False
185186napoleon_use_ivar = True
@@ -270,10 +271,12 @@ def visit_Assign(self, node):
270271# Add any paths that contain templates here, relative to this directory.
271272templates_path = ['_templates' ]
272273
273- # The suffix(es) of source filenames.
274- # You can specify multiple suffix as a list of string:
275- #
276- source_suffix = ['.rst' , '.md' ]
274+ # The suffix(es) of source filenames. Mapping form avoids Sphinx
275+ # converting a legacy list at runtime.
276+ source_suffix = {
277+ '.rst' : 'restructuredtext' ,
278+ '.md' : 'markdown' ,
279+ }
277280
278281# The master toctree document.
279282master_doc = 'index'
@@ -300,15 +303,13 @@ def visit_Assign(self, node):
300303# a list of builtin themes.
301304#
302305html_theme = 'sphinx_rtd_theme'
303- html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
304306
305307# Theme options are theme-specific and customize the look and feel of a theme
306308# further. For a list of options available for each theme, see the
307309# documentation.
308310#
309311html_theme_options = {
310312 'collapse_navigation' : False ,
311- 'display_version' : True ,
312313 'navigation_depth' : - 1 ,
313314 # 'logo_only': True,
314315}
@@ -318,7 +319,10 @@ def visit_Assign(self, node):
318319# Add any paths that contain custom static files (such as style sheets) here,
319320# relative to this directory. They are copied after the builtin static files,
320321# so a file named "default.css" will overwrite the builtin "default.css".
321- html_static_path = ['_static' ]
322+ # Keep empty by default to avoid warnings when generated projects do not
323+ # define custom static assets. Projects that create ``docs/source/_static``
324+ # can opt back in locally.
325+ html_static_path = []
322326
323327# Custom sidebar templates, must be a dictionary that maps document names
324328# to template names.
0 commit comments