Skip to content

Commit 6b3cf18

Browse files
📝 Add docstrings to dev-from-macmini
Docstrings generation was requested by @myoshi2891. * #278 (comment) The following files were modified: * `generate_index.py`
1 parent 4887ca5 commit 6b3cf18

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

generate_index.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,14 @@ def copy_vendor_files(self, output_dir: str) -> None:
7676
print(f"Copied FontAwesome webfonts: {fa_fonts_src} -> {fa_fonts_dest}")
7777

7878
def rewrite_html_content(self, content: str) -> str:
79-
"""Replaces CDN links with local vendor links."""
79+
"""
80+
Rewrite known CDN asset URLs in an HTML document to their corresponding local vendor paths.
81+
82+
Replaces specific external CDN links (React, Babel, Tailwind, PrismJS, FontAwesome, etc.) with local /vendor/... paths so the returned HTML references vendored assets.
83+
84+
Returns:
85+
The input HTML string with matched CDN URLs substituted by local vendor URLs.
86+
"""
8087
replacements = [
8188
# React
8289
('https://unpkg.com/react@18/umd/react.development.js', '/vendor/react/react.development.js'),

0 commit comments

Comments
 (0)