Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion generate_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ <h1 class="site-title">

<footer>
<span class="footer-icon">🧪</span>
Generated on 2026-02-20 07:18:20 UTC
Generated on 2026-02-20 07:20:00 UTC
</footer>

<script>
Expand Down