Skip to content

Commit

Permalink
patch relative urls first, then overload with voici-specific paths
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Jan 15, 2025
1 parent 853cb1d commit a5d9a7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/voici-core/voici_core/tree_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,17 @@ def patch_page_config(

voici_url_prefix = "../" * (1 + len(relative_path.parts))
base_url_prefix = f"../{voici_url_prefix}"
# emulate upstream ``config-utils.js``
patch_relative_urls(page_config_copy, base_url_prefix)
page_config_copy.update(
# Align the base url with the relative path
baseUrl=base_url_prefix,
# Grabbing from the Voici static folder
fullStaticUrl=f"{voici_url_prefix}build",
# The Themes URL will be joined with the base URL in the
# JupyterLite main application
themesUrl="./build/themes",
)
# emulate upstream ``config-utils.js``
patch_relative_urls(page_config_copy, base_url_prefix)

if config.theme == "light":
themeName = "JupyterLab Light"
Expand Down

0 comments on commit a5d9a7b

Please sign in to comment.