|
1 | 1 | """Sphinx documentation configuration file.""" |
2 | 2 | from datetime import datetime |
| 3 | +import os |
3 | 4 |
|
| 5 | +from ansys_sphinx_theme import get_version_match |
4 | 6 | from ansys_sphinx_theme import pyansys_logo_black as logo |
5 | 7 |
|
6 | 8 | from ansys.tools.path import __version__ |
|
17 | 19 | html_short_title = html_title = "ansys-tools-path" |
18 | 20 |
|
19 | 21 | # specify the location of your github repo |
| 22 | +cname = os.getenv("DOCUMENTATION_CNAME", default="nocname.com") |
| 23 | +switcher_version = get_version_match(__version__) |
| 24 | +html_context = { |
| 25 | + "github_user": "pyansys", |
| 26 | + "github_repo": "ansys-tools-path", |
| 27 | + "github_version": "main", |
| 28 | + "doc_path": "doc/source", |
| 29 | +} |
20 | 30 | html_theme_options = { |
| 31 | + "switcher": { |
| 32 | + "json_url": f"https://{cname}/versions.json", |
| 33 | + "version_match": switcher_version, |
| 34 | + }, |
21 | 35 | "github_url": "https://github.com/pyansys/ansys-tools-path", |
22 | 36 | "show_prev_next": False, |
23 | 37 | "show_breadcrumbs": True, |
| 38 | + "collapse_navigation": True, |
| 39 | + "use_edit_page_button": True, |
24 | 40 | "additional_breadcrumbs": [ |
25 | 41 | ("PyAnsys", "https://docs.pyansys.com/"), |
26 | 42 | ], |
|
0 commit comments