@@ -100,6 +100,7 @@ def setup(app):
100
100
copyright = f"(c) { datetime .datetime .now ().year } ANSYS, Inc. All rights reserved"
101
101
author = "Ansys Inc."
102
102
cname = os .getenv ("DOCUMENTATION_CNAME" , "nocname.com" )
103
+ switcher_version = get_version_match (__version__ )
103
104
104
105
# Check for the local config file, otherwise use default desktop configuration
105
106
local_config_file = os .path .join (local_path , "local_config.json" )
@@ -134,6 +135,7 @@ def setup(app):
134
135
"sphinx.ext.inheritance_diagram" ,
135
136
"numpydoc" ,
136
137
"ansys_sphinx_theme.extension.linkcode" ,
138
+ "recommonmark" ,
137
139
]
138
140
139
141
# Intersphinx mapping
@@ -266,7 +268,7 @@ def setup(app):
266
268
# necessary for pyvista when building the sphinx gallery
267
269
pyvista .BUILDING_GALLERY = True
268
270
269
- if config ["run_examples" ]:
271
+ if config ["run_examples" ] and not os . environ . get ( "PYAEDT_SKIP_EXAMPLE" , False ) :
270
272
extensions .append ("sphinx_gallery.gen_gallery" )
271
273
272
274
sphinx_gallery_conf = {
@@ -340,6 +342,12 @@ def setup(app):
340
342
"url" : "https://github.com/ansys/pyaedt/discussions" ,
341
343
"icon" : "fa fa-comment fa-fw" ,
342
344
},
345
+ {
346
+ "name" : "Download documentation in PDF" ,
347
+ "url" : f"https://{ cname } /version/{ switcher_version } /_static/assets/download/pyaedt.pdf" ,
348
+ # noqa: E501
349
+ "icon" : "fa fa-file-pdf fa-fw" ,
350
+ },
343
351
],
344
352
"switcher" : {
345
353
"json_url" : f"https://{ cname } /versions.json" ,
0 commit comments