@@ -14,7 +14,7 @@ sys.path.insert(0, os.path.abspath('../src'))
1414# -- Project information -----------------------------------------------------
1515project = 'Ubiquity Robotics Documentation'
1616copyright = '2025, Ubiquity Robotics'
17- author = 'Pavel for now '
17+ author = 'Paveljolak '
1818version = ''
1919release = '1.0.0'
2020
@@ -36,6 +36,14 @@ pygments_style = None
3636html_theme = 'sphinx_rtd_theme'
3737html_static_path = ['_static']
3838
39+ html_logo = "_static/logos/UbiquityRobotics_Logo_Full_White.png"
40+
41+ html_css_files = [
42+ 'custom.css'
43+ ]
44+
45+ html_js_files = ['custom.js']
46+
3947# -- RTD lower-left menu setup -----------------------------------------------
4048try:
4149 html_context
@@ -45,7 +53,8 @@ except NameError:
4553html_context['display_lower_left'] = True
4654
4755# Repo and environment info
48- REPO_NAME = os.environ.get('REPO_NAME', '')
56+ full_repo = os.environ.get('GITHUB_REPOSITORY', '')
57+ REPO_NAME = full_repo.split('/')[-1]
4958OWNER = os.environ.get('OWNER', '')
5059
5160# Use ALL_VERSIONS from workflow environment
@@ -56,10 +65,19 @@ current_version = os.environ.get('CURRENT_BRANCH') or (ALL_VERSIONS[0] if ALL_VE
5665html_context['current_version'] = current_version
5766html_context['version'] = current_version
5867
68+
5969# Base URL for GitHub Pages
60- GITHUB_PAGES_BASE = f"https://{OWNER}.github.io/{REPO_NAME}"
6170
62- # Set versions for selector with absolute URLs
71+ # Get the custom domain
72+ CUSTOM_DOMAIN = os.environ.get("CUSTOM_DOMAIN", "")
73+
74+ # If the DOMAIN exists in the workflow then use it
75+ if CUSTOM_DOMAIN:
76+ GITHUB_PAGES_BASE = f"https://{REPO_NAME}.{CUSTOM_DOMAIN}"
77+ else:
78+ GITHUB_PAGES_BASE = f"https://{OWNER}.github.io/{REPO_NAME}"# Set versions for selector with absolute URLs
79+
80+ # Build the absolute URLs for each version
6381html_context['versions'] = [
6482 (v, f"{GITHUB_PAGES_BASE}/{v}/") for v in ALL_VERSIONS
6583]
@@ -71,8 +89,7 @@ html_context['language'] = ''
7189
7290# -- "Edit on GitHub" links --------------------------------------------------
7391html_context['display_github'] = True
74- html_context['github_user'] = ''
92+ html_context['github_user'] = OWNER
7593html_context['github_repo'] = REPO_NAME
7694html_context['github_version'] = f'{current_version}/docs/'
7795
78-
0 commit comments