Skip to content

doc: lazy load images on resources listing page #2493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
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
6 changes: 5 additions & 1 deletion util/create_resources_listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,12 @@ def process_resource_files(out, file_list: List[Path]):
# IMPORTANT:
# 1. 11 chars to match the start of "image" above
# 2. :class: checkered-bg to apply the checkers to transparent images
out.write(f" :class: checkered-bg\n\n")
out.write(f" :class: checkered-bg\n")
# 3. :loading: lazy stops GitHub 429ing us ("chill pls") # pending: stop using GH raw as a CDN
out.write(f" :loading: lazy\n")
out.write("\n")
out.write(f" {name}\n")

elif suffix in SUFFIX_TO_AUDIO_TYPE:
file_path = FMT_URL_REF_EMBED.format(resource_path)
src_type=SUFFIX_TO_AUDIO_TYPE[suffix]
Expand Down
Loading