Skip to content

Commit 8068fdd

Browse files
authored
Adding the README, conf.py, and conf.py.orig changes from main. (#49)
1 parent a7d165d commit 8068fdd

3 files changed

Lines changed: 30 additions & 9 deletions

File tree

README.MD

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ The site hosts technical documentation for Ubiquity Robotics robots, covering ha
1414

1515
The documentation is built and deployed automatically using GitHub Actions. The latest version is available at:
1616

17-
<!-- TODO: Change this to the actual website when the repo is switched. -->
18-
**[https://paveljolak.github.io/learn2/](https://paveljolak.github.io/learn2/)**
17+
**[https://learn2.ubiquityrobotics.com/jazzy/](https://learn2.ubiquityrobotics.com/jazzy/)**
1918

2019
## Local Development
2120

2221
To build and run the documentation locally:
2322

2423
<!-- TODO: Add the right links and names for cloning the repository. -->
2524
```bash
26-
git clone https://github.com/Paveljolak/learn2.git
25+
git clone https://github.com/UbiquityRobotics/learn2.git
2726
cd learn2
2827
git fetch --all
2928
git branch -a

docs/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@
8484

8585
# project_name = project.replace(' ', '_')
8686

87+
# IMPORTANT:
88+
# ---------------------------------------------------------------------------------------------
89+
# This part gives error that language does not exists and set it to "None" in the local build process
90+
# DO NOT CHANGE IT: you will break the version management for the deployed documentation
8791
html_context['current_language'] = ''
8892
html_context['language'] = ''
93+
# ---------------------------------------------------------------------------------------------
8994

9095
# -- "Edit on GitHub" links --------------------------------------------------
9196
html_context['display_github'] = True

docs/conf.py.orig

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sys.path.insert(0, os.path.abspath('../src'))
1414
# -- Project information -----------------------------------------------------
1515
project = 'Ubiquity Robotics Documentation'
1616
copyright = '2025, Ubiquity Robotics'
17-
author = 'Pavel for now'
17+
author = 'Paveljolak'
1818
version = ''
1919
release = '1.0.0'
2020

@@ -36,6 +36,14 @@ pygments_style = None
3636
html_theme = 'sphinx_rtd_theme'
3737
html_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 -----------------------------------------------
4048
try:
4149
html_context
@@ -45,7 +53,8 @@ except NameError:
4553
html_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]
4958
OWNER = 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
5665
html_context['current_version'] = current_version
5766
html_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
6381
html_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 --------------------------------------------------
7391
html_context['display_github'] = True
74-
html_context['github_user'] = ''
92+
html_context['github_user'] = OWNER
7593
html_context['github_repo'] = REPO_NAME
7694
html_context['github_version'] = f'{current_version}/docs/'
7795

78-

0 commit comments

Comments
 (0)