diff --git a/build_pages.py b/build_pages.py index cdfa5a6..bde9872 100644 --- a/build_pages.py +++ b/build_pages.py @@ -32,6 +32,62 @@ ".yaml", } +NOTEBOOK_THEME_OVERRIDES = """ + +""" + def should_skip(path: Path) -> bool: return any(part in EXCLUDED_PARTS for part in path.parts) @@ -77,6 +133,8 @@ def rewrite_notebook_links(text: str) -> str: def rewrite_html_links(html_path: Path) -> None: content = html_path.read_text(encoding="utf-8") updated = rewrite_notebook_links(content) + if NOTEBOOK_THEME_OVERRIDES not in updated and "" in updated: + updated = updated.replace("", f"{NOTEBOOK_THEME_OVERRIDES}\n", 1) if updated != content: html_path.write_text(updated, encoding="utf-8")