@@ -100,6 +100,7 @@ def setup(app):
100100copyright = f"(c) { datetime .datetime .now ().year } ANSYS, Inc. All rights reserved"
101101author = "Ansys Inc."
102102cname = os .getenv ("DOCUMENTATION_CNAME" , "nocname.com" )
103+ switcher_version = get_version_match (__version__ )
103104
104105# Check for the local config file, otherwise use default desktop configuration
105106local_config_file = os .path .join (local_path , "local_config.json" )
@@ -134,6 +135,7 @@ def setup(app):
134135 "sphinx.ext.inheritance_diagram" ,
135136 "numpydoc" ,
136137 "ansys_sphinx_theme.extension.linkcode" ,
138+ "recommonmark" ,
137139]
138140
139141# Intersphinx mapping
@@ -266,7 +268,7 @@ def setup(app):
266268 # necessary for pyvista when building the sphinx gallery
267269 pyvista .BUILDING_GALLERY = True
268270
269- if config ["run_examples" ]:
271+ if config ["run_examples" ] and not os . environ . get ( "PYAEDT_SKIP_EXAMPLE" , False ) :
270272 extensions .append ("sphinx_gallery.gen_gallery" )
271273
272274 sphinx_gallery_conf = {
@@ -340,6 +342,12 @@ def setup(app):
340342 "url" : "https://github.com/ansys/pyaedt/discussions" ,
341343 "icon" : "fa fa-comment fa-fw" ,
342344 },
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+ },
343351 ],
344352 "switcher" : {
345353 "json_url" : f"https://{ cname } /versions.json" ,
0 commit comments