File tree Expand file tree Collapse file tree 5 files changed +41
-0
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 5 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ Style autolinks from Python example code to reference documentation
3
+ (https://sphinx-codeautolink.readthedocs.io/en/latest/examples.html#custom-link-styles)
4
+ */
5
+
6
+ .sphinx-codeautolink-a {
7
+ text-decoration-style : solid !important ;
8
+ text-decoration-color : # aaa ;
9
+ }
10
+ .sphinx-codeautolink-a : hover {
11
+ text-decoration-color : black;
12
+ }
Original file line number Diff line number Diff line change 36
36
'sphinx.ext.coverage' ,
37
37
'sphinx.ext.doctest' ,
38
38
'sphinx.ext.extlinks' ,
39
+ 'sphinx_codeautolink' ,
39
40
]
40
41
41
42
# Skip if downstream redistributors haven't installed them
404
405
# Additional static files.
405
406
html_static_path = ['_static' , 'tools/static' ]
406
407
408
+ # Additional CSS files.
409
+ html_css_files = ["sphinx-codeautolink.css" ]
410
+
407
411
# Output file base name for HTML help builder.
408
412
htmlhelp_basename = 'python' + release .replace ('.' , '' )
409
413
413
417
# Split pot files one per reST file
414
418
gettext_compact = False
415
419
420
+ # Options for automatic links from code examples to reference documentation.
421
+ # (https://sphinx-codeautolink.readthedocs.io/)
422
+ codeautolink_warn_on_missing_inventory = False
423
+ codeautolink_warn_on_failed_resolve = False
424
+ codeautolink_custom_blocks = {
425
+ # https://sphinx-codeautolink.readthedocs.io/en/latest/examples.html#doctest-code-blocks
426
+ "pycon3" : "sphinx_codeautolink.clean_pycon" ,
427
+ }
428
+
429
+ suppress_warnings = [
430
+ # "codeautolink",
431
+ "codeautolink.import_star" ,
432
+ "codeautolink.match_block" ,
433
+ "codeautolink.match_name" ,
434
+ "codeautolink.parse_block" ,
435
+ "config.cache" ,
436
+ ]
437
+
438
+
416
439
# Options for LaTeX output
417
440
# ------------------------
418
441
Original file line number Diff line number Diff line change @@ -22,3 +22,6 @@ sphinxcontrib-serializinghtml<3
22
22
23
23
# Direct dependencies of Jinja2 (Jinja is a dependency of Sphinx, see above)
24
24
MarkupSafe<3
25
+
26
+ # Direct dependencies of the sphinx-codeautolink extension
27
+ beautifulsoup4<4.13.4
Original file line number Diff line number Diff line change 13
13
14
14
sphinxext-opengraph ~= 0.9.0
15
15
sphinx-notfound-page ~= 1.0.0
16
+ sphinx-codeautolink ~= 0.17.4
16
17
17
18
# The theme used by the documentation is stored separately, so we need
18
19
# to install that as well.
Original file line number Diff line number Diff line change
1
+ Add sphinx-codeautolink extension for reference links in code examples.
2
+ Patch by Colin Marquardt.
You can’t perform that action at this time.
0 commit comments