Skip to content

Commit f734471

Browse files
committed
Fix sphinx autoapi extension not loading api reference template
1 parent fafc16d commit f734471

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

doc/source/conf.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from ansys.rocky.core import __version__
1616

1717
# Project information
18-
project = "pyrocky"
18+
project = "ansys-rocky-core"
1919
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
2020
author = "ANSYS, Inc."
2121
release = version = __version__
@@ -26,6 +26,9 @@
2626
html_theme = "ansys_sphinx_theme"
2727
html_short_title = html_title = "pyrocky"
2828

29+
# The name of the Pygments (syntax highlighting) style to use.
30+
pygments_style = "sphinx"
31+
2932
# specify the location of your github repo
3033
html_theme_options = {
3134
"github_url": "https://github.com/ansys/pyrocky",
@@ -39,10 +42,12 @@
3942
"version_match": get_version_match(version),
4043
},
4144
"check_switcher": False,
45+
"ansys_sphinx_theme_autoapi": {"project": project},
4246
}
4347

4448
# Sphinx extensions
4549
extensions = [
50+
"ansys_sphinx_theme.extension.autoapi",
4651
"sphinx.ext.autodoc",
4752
"sphinx.ext.autosummary",
4853
"numpydoc",
@@ -128,13 +133,11 @@
128133
"show-module-summary",
129134
"special-members",
130135
]
131-
autoapi_template_dir = get_autoapi_templates_dir_relative_path(Path(__file__))
136+
autoapi_template_dir = get_autoapi_templates_dir_relative_path(Path(__file__).parent)
132137
suppress_warnings = ["autoapi.python_import_resolution"]
133138
autoapi_python_use_implicit_namespaces = True
134139
autoapi_keep_files = True
135140
autoapi_render_in_single_page = ["class", "enum", "exception"]
136141

137142
# PyAnsys tags configuration
138-
html_context = {
139-
"pyansys_tags": ['Fluids']
140-
}
143+
html_context = {"pyansys_tags": ["Fluids"]}

0 commit comments

Comments
 (0)