diff --git a/docs/conf.py b/docs/conf.py index fd64716f1..6f9dfe025 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -448,14 +448,30 @@ def linkcode_resolve(domain, info): ), ] - -# Use pyvista's image scraper for example gallery +# -- pyvista configuration --------------------------------------------------- import pyvista -# Make sure off screen is set to true when building locally -pyvista.OFF_SCREEN = True +# Manage errors +pyvista.set_error_output_file("errors.txt") +# Ensure that offscreen rendering is used for docs generation +pyvista.OFF_SCREEN = True # Not necessary - simply an insurance policy +# Preferred plotting style for documentation +pyvista.set_plot_theme("document") +pyvista.global_theme.window_size = [1024, 768] +pyvista.global_theme.font.size = 22 +pyvista.global_theme.font.label_size = 22 +pyvista.global_theme.font.title_size = 22 +pyvista.global_theme.return_cpos = False +pyvista.set_jupyter_backend(None) +# Save figures in specified directory +pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/") +if not os.path.exists(pyvista.FIGURE_PATH): + os.makedirs(pyvista.FIGURE_PATH) + + # necessary when building the sphinx gallery pyvista.BUILDING_GALLERY = True +os.environ["PYVISTA_BUILDING_GALLERY"] = "true" # Sphinx Gallery sphinx_gallery_conf = {