diff --git a/README.MD b/README.MD index 21e192c..2b02fe7 100644 --- a/README.MD +++ b/README.MD @@ -14,8 +14,7 @@ The site hosts technical documentation for Ubiquity Robotics robots, covering ha The documentation is built and deployed automatically using GitHub Actions. The latest version is available at: - -**[https://paveljolak.github.io/learn2/](https://paveljolak.github.io/learn2/)** +**[https://learn2.ubiquityrobotics.com/jazzy/](https://learn2.ubiquityrobotics.com/jazzy/)** ## Local Development @@ -23,7 +22,7 @@ To build and run the documentation locally: ```bash -git clone https://github.com/Paveljolak/learn2.git +git clone https://github.com/UbiquityRobotics/learn2.git cd learn2 git fetch --all git branch -a diff --git a/docs/conf.py b/docs/conf.py index b4b0bce..6006630 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -84,8 +84,13 @@ # project_name = project.replace(' ', '_') +# IMPORTANT: +# --------------------------------------------------------------------------------------------- +# This part gives error that language does not exists and set it to "None" in the local build process +# DO NOT CHANGE IT: you will break the version management for the deployed documentation html_context['current_language'] = '' html_context['language'] = '' +# --------------------------------------------------------------------------------------------- # -- "Edit on GitHub" links -------------------------------------------------- html_context['display_github'] = True diff --git a/docs/conf.py.orig b/docs/conf.py.orig index 1b821b5..b4b0bce 100644 --- a/docs/conf.py.orig +++ b/docs/conf.py.orig @@ -14,7 +14,7 @@ sys.path.insert(0, os.path.abspath('../src')) # -- Project information ----------------------------------------------------- project = 'Ubiquity Robotics Documentation' copyright = '2025, Ubiquity Robotics' -author = 'Pavel for now' +author = 'Paveljolak' version = '' release = '1.0.0' @@ -36,6 +36,14 @@ pygments_style = None html_theme = 'sphinx_rtd_theme' html_static_path = ['_static'] +html_logo = "_static/logos/UbiquityRobotics_Logo_Full_White.png" + +html_css_files = [ + 'custom.css' +] + +html_js_files = ['custom.js'] + # -- RTD lower-left menu setup ----------------------------------------------- try: html_context @@ -45,7 +53,8 @@ except NameError: html_context['display_lower_left'] = True # Repo and environment info -REPO_NAME = os.environ.get('REPO_NAME', '') +full_repo = os.environ.get('GITHUB_REPOSITORY', '') +REPO_NAME = full_repo.split('/')[-1] OWNER = os.environ.get('OWNER', '') # Use ALL_VERSIONS from workflow environment @@ -56,10 +65,19 @@ current_version = os.environ.get('CURRENT_BRANCH') or (ALL_VERSIONS[0] if ALL_VE html_context['current_version'] = current_version html_context['version'] = current_version + # Base URL for GitHub Pages -GITHUB_PAGES_BASE = f"https://{OWNER}.github.io/{REPO_NAME}" -# Set versions for selector with absolute URLs +# Get the custom domain +CUSTOM_DOMAIN = os.environ.get("CUSTOM_DOMAIN", "") + +# If the DOMAIN exists in the workflow then use it +if CUSTOM_DOMAIN: + GITHUB_PAGES_BASE = f"https://{REPO_NAME}.{CUSTOM_DOMAIN}" +else: + GITHUB_PAGES_BASE = f"https://{OWNER}.github.io/{REPO_NAME}"# Set versions for selector with absolute URLs + +# Build the absolute URLs for each version html_context['versions'] = [ (v, f"{GITHUB_PAGES_BASE}/{v}/") for v in ALL_VERSIONS ] @@ -71,8 +89,7 @@ html_context['language'] = '' # -- "Edit on GitHub" links -------------------------------------------------- html_context['display_github'] = True -html_context['github_user'] = '' +html_context['github_user'] = OWNER html_context['github_repo'] = REPO_NAME html_context['github_version'] = f'{current_version}/docs/' -