-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconf.py
67 lines (55 loc) · 2.07 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Configuration file for the Sphinx documentation builder.
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
# Insert the parent directory (where your code is) into the system path
sys.path.insert(0, os.path.abspath('..'))
project = 'FALCONZ'
copyright = '2023, Quantitative Imaging and Medical Physics Team, Medical University of Vienna'
author = 'Lalith Kumar Shiyam Sundar | Sebastian Gutschmayer | Manuel Pires'
release = '2.0' # Update with Falconz's current version
# Extensions
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinx.ext.linkcode',
'sphinx_rtd_dark_mode', # Add this line for direct linking to GitHub source
]
# Intersphinx mapping for external libraries
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
}
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# Theme and static files
html_theme = "sphinx_rtd_theme"
html_static_path = ['_static']
# GitHub linking for "Edit on Github" feature
html_context = {
"display_github": True,
"github_user": "LalithShiyam",
"github_repo": "FALCON",
"github_version": "main",
"conf_py_path": "/docs/",
}
# Function to resolve direct linking to GitHub source
def linkcode_resolve(domain, info):
if domain != 'py':
return None
if not info['module']:
return None
filename = info['module'].replace('.', '/')
return f"https://github.com/LalithShiyam/FALCON/blob/main/{filename}.py"
html_theme_options = {
"style_nav_header_background": "#343131", # Optional: Change the navbar header color
"dark_mode_theme": "darkly", # Optional: Set the dark mode theme to "darkly"
}
html_css_files = [
'custom.css',
]
# Update logo path if Falconz has a different logo
html_logo = '_static/Falcon-logo.png' # Update this path if necessary