diff --git a/generate_index.py b/generate_index.py index 0d0d50d9..1a56f0f7 100644 --- a/generate_index.py +++ b/generate_index.py @@ -76,7 +76,14 @@ def copy_vendor_files(self, output_dir: str) -> None: print(f"Copied FontAwesome webfonts: {fa_fonts_src} -> {fa_fonts_dest}") def rewrite_html_content(self, content: str) -> str: - """Replaces CDN links with local vendor links.""" + """ + Rewrite known CDN asset URLs in an HTML document to their corresponding local vendor paths. + + Replaces specific external CDN links (React, Babel, Tailwind, PrismJS, FontAwesome, etc.) with local /vendor/... paths so the returned HTML references vendored assets. + + Returns: + The input HTML string with matched CDN URLs substituted by local vendor URLs. + """ replacements = [ # React ('https://unpkg.com/react@18/umd/react.development.js', '/vendor/react/react.development.js'), diff --git a/public/index.html b/public/index.html index b1682669..c8f71d87 100644 --- a/public/index.html +++ b/public/index.html @@ -785,7 +785,7 @@